This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
1 - native 2 - sequence (oracle sequence name, or let hibernate do it?)
Here's something you could try. The id value is being inserted by the trigger for you so in my opinion you do not have to specify andy Generation strategy for your Id column. I suggest you set the updateable=false and insertable=false for the id column. You should be able to specify that either in the xml file or using @Column annotation.