Uwe Risse [
https://community.jboss.org/people/uwe.risse] created the discussion
"Re: Oracle custom sequence instead of select hibernate_seque"
To view the discussion, visit:
https://community.jboss.org/message/819864#819864
--------------------------------------------------------------
The thread is rather old but I have the same problem with hibernate 3.6.4.
I could solve this by adding the attribute allocationSize=1 to the annotation
In your case:
@Id(generate = GeneratorType.SEQUENCE, generator = "mysequence")
@SequenceGenerator(name = "mysequence", sequenceName =
"MY_SEQ",*allocationSize=1*)
//@SequenceGenerator(name = "mysequence", sequenceName =
"hibernate_sequence")
@Column(name = "COVT_ID", primaryKey=*true*)
*public* *long* getId() {
*return* m_id;
}
should work.
| |
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/819864#819864]
Start a new discussion in EJB3 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]