Hi!
I haven not read all posts but I know the following works with Oracle.
1. Annotate your entity with @Entity as normal.
2. Annotate your ID column with @Id. @GeneratedValue(strategy=GenerattionType.AUTO,
generator="seqMyObject"), @SequenceGenerator(name="seqMyObject",
sequenceMame="SEQ_MY_OBJECT")
|
| @Entity
| public class MyObject {
|
| @Id
| @GeneratedValue(strategy=GenerationType.AUTO, generator="seqMyObject")
| @SequenceGenerator(name="seqMyObject",
sequenceName="SEQ_MY_OBJECT")
| private Long id;
|
| ...
|
| }
|
|
This shall work. As previous posts said it shall also be possible to put the
sequenceGenerator annotation in the class but in my point of view it looks better to put
it on the id property.
Cheers,
Oskar
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164503#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...