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>) ?
|