• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate annotations

jagrutkumar dalwadi
Ranch Hand
Posts: 83
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Hibernate 3. In that I am using
utility for generating the db from Pojo with annotations.

I am facing one odd behaviour which is as below:
When I have put unique constraint on my getter method, it is creating Unique constraint in database.

2. However when I have put this annotation on my field, it is not creating unique constraint in database.

can anyone suggest regarding such behaviour?

Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!