Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • 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
hibernate.hbm2ddl.auto=update
utility for generating the db from Pojo with annotations.

I am facing one odd behaviour which is as below:
1.
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?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic