Re: [hibernate-dev] Unique key constraint

2011-11-04 Thread Ankita Patil
I read about the UniqueKeyValidator. Will it throw me an exception or hibernate will handle on its own and save only one entry n not duplicate entries? Thanks Ankita On 4 November 2011 12:43, Ankita Patil wrote: > Hi, > I already have an id as the primary key for the table say XYZ. > > Now, I w

[hibernate-dev] Unique key constraint

2011-11-04 Thread Ankita Patil
Hi, I already have an id as the primary key for the table say XYZ. Now, I want to set a field or a combination of two fields as a unique key so that when i try to save say 2 entries in the DB with same value for the unique key field then only one entry should be made in the table with one primary