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

Assigned id generator and Save Method

 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

While going through the book " Hibernate Quickly", i got confused with this statement -

Keep in mind that Hibernate
doesn’t set the ID value if the generator type is assigned.)


What i deduced that when the generator type is Assigned, we won't get id value of that object. Please confirm me whether i understood it well or not and along with why is it that we don't get Id value in case of assigned generator.

Thanks a lot.
~Patricia.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use a generation strategy of "assigned" you need to assign the id yourself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic