[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Getting generated ID by sequence
do-not-reply at jboss.com
Mon Mar 12 03:50:50 EDT 2007
"andydale" wrote : Hi,
| Try declaring your sdequence as so:
| @SequenceGenerator(name = "tsperson_sequence", allocationSize=1, sequenceName = "SEQ_TSPERSON_ID")
| You must have the allocationSize=1 (or some other value) or it uses some kind of hi-lo strategy.
When I declare SequenceGenerator with allocationSize
id of object in memory is always id in DB minus one.
Do you know what the problem is, and how can I solve it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027067#4027067
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027067
More information about the jboss-user