posted 14 years ago
Hi,
I have a table called category in the database which has 2 columns. Id(Primary key) and Title (should be unique)
I am trying to specify that this title should be unique. I am using the hbm file for mapping.
Please see the file as below.
whether is specify unique = true or unique-key = true and try to save a category whose title is "Soaps" multiple times
it still gets saved. The id is automatically generated by using an autoincrement option.., how do i force so that the category should not be saved multiple times .. with the same title.
Please advise.
Regards,
Suhas
Thanks and Regards,
Suhas
http://www.xplore-java.blogspot.com/