-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate reverse engineering and oracle sequences
PostPosted: Tue Oct 14, 2008 9:00 pm 
Newbie

Joined: Tue Oct 14, 2008 8:26 pm
Posts: 2
If you use the following configuration in the hibernate reverse engineering file to generate annotations for an entity you get the following annotations:

<primary-key>
<generator class="sequence">
<param name="sequence">MY_SEQ</param>
</generator>
<key-column .... />
</primary-key>

@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="sequence")
@SequenceGenerator(name="sequence",sequenceName="MY_SEQ")
private long id;


However, this doesn't work properly for an oracle database (see my previous post) unless you add allocationSize=1 to @SequenceGenerator. Does anyone how to do this? I can't find any documentation, which defines how to add another parameter for allocationSize (<param name="?">1</param>) ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.