Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to save the object value without using Generation Strategy ?

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My database is Oracle, and my id column value is an Oracle sequence, this sequence is executed by a trigger, so, before each row is inserted this trigger use this sequence to get the id value. So I am confused in which id strategy generation should I define in my entity class.

I defined like this-



Still the hibernate is throwing me error message-

Caused by org.hibernate.id.IdentifierGenerationException with message: "ids for this class must be manually assigned before calling save():


My intention is to skip hibernate validations. As I want to insert values using oracler trigger sequence.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Idea Guys ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic