I use
@TableGenerator(name="tab",initialValue=2,allocationSize=50)
on objects and define an identifier using
@Id @GeneratedValue(generator="tab",strategy=GenerationType.TABLE) private int id;
but Hibernate still uses 0 as an identifier.
I cannot use @GenericGenerator because annotations do not come with Hibernate4, which comes with Jboss AS7.
Is there a simple solution or do I need to write my own generator?
source share