I am using
@TableGenerator(name="tab",initialValue=2,allocationSize=50)
on Entities and define the ID with
@Id
@GeneratedValue(generator="tab",strategy=GenerationType.TABLE)
private int id;
yet Hibernate still uses 0 as an ID.
I cannot use @GenericGenerator because the annotations do not come with Hibernate4 that ships with Jboss AS7.
Is there a simple solution or do I have to write a custom Generator?