I am using hibernate3-maven-plugin version 2.0 hbm2ddl to generate SQL scripts from code. I am using process-classes. I my Entity class I am using a sequence. @SequenceGenerator(name="sessionSeq", sequenceName="SESSION_SEQ", allocationSize=50, initialValue=1) When I run the Maven script, this generates create sequence hibernate_sequence; I wanted it to generate something like create sequence hibernate_sequence increment by 50;
Can someone help me?
I am using the following jars : hibernate-tools - 3.2.4.GA, hibernate-core - 3.6.1.Final, hibernate-entitymanager - 3.6.1.Final, hibernate-validator - 4.1.0.Final, hibernate-validator-legacy - 4.0.2.GA and DB related jars.
The hbm2ddl is not picking up the allocationSize=50 property of the @SequenceGenerator when I am trying to generate the .SQL file.
This is an extract of the code:
@Entity @SequenceGenerator(name="sessionInfoIdSeq", sequenceName="SESSIONINFO_ID_SEQ", allocationSize=50)
public class SessionInfo {
@Id @GeneratedValue(strategy = GenerationType.AUTO, generator="sessionInfoIdSeq")
private Integer id;