Page 1 of 1

How to prevent duplicate values from populating in listGrid

Posted: Wed Oct 23, 2013 8:23 am
by luky
hi,
I m fetching the list of values in a table which is related to product from the database..I need to prevent duplicate values from adding into the list of values displayed in the admin..

I have added unique constraint in the @Id column for the table data displayed..when i save the form, for each save i do i m getting an extra row created in the form..but i'm not sure where the duplicate values come from and how to remove it,,

Re: How to prevent duplicate values from populating in listGrid

Posted: Thu Oct 24, 2013 10:00 am
by phillipuniverse
Whenever you add something in the admin if you try to do that with the same primary key then it should throw an exception for the primary key violation.

What entity is this? If it's a custom one, what do you have for the JPA annotations for the id field?