I am using Hibernate Core 3.2.6 G with Hibernate Annotations 3.3.1 GA.
My id field has the following
Code:
@SequenceGenerator(name= "name", sequenceName = "seqName")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="name")
when viewing the sql the sequence is called just fine, but the insert does not use the key that came from the sequence, it uses some other value that I have no clue where it came from.
All the examples I can find list this as the correct way to use a sequence.
Any help would be great.
thanks
OK so I got it to work by removing
Code:
strategy = GenerationType.SEQUENCE
is there any reason that should cause the behavior I had?