Dear I was using TableGenerator as below
| @TableGenerator(name = "IdGen", | table = "ID_GENERATOR", | pkColumnName = "ID_NO", | pkColumnValue = "1", | valueColumnName = "NEXT_VALUE", | allocationSize = 1) | and Pk field has the annotation as below | @Id @GeneratedValue(strategy=GenerationType.TABLE, generator="IdGen") | But there is unexpected value is inserted to the pk column as message 15:49:59,203 DEBUG [SQL] select NEXT_VALUE from ID_GENERATOR where ID_NO = '1' for update 15:49:59,531 DEBUG [AbstractBatcher] closing JDBC connection (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0) 15:49:59,609 DEBUG [Isolater] surrounding JTA transaction resumed [TransactionImpl:XidImpl[FormatId=257, GlobalId=RitchieKoh/14, BranchQual=, localId=14]] 15:49:59,609 DEBUG [MultipleHiLoPerTableGenerator] new hi value: 1008 15:49:59,609 DEBUG [AbstractSaveEventListener] generated identifier: 2016, using strategy: org.hibernate.id.MultipleHiLoPerTableGenerator Why did get the 2016 value instead of 1008 Please let me know why? # Ritchie View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932049#3932049 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932049 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
