Hi all,
I am trying to migrate a small test application running under Glassfish / Toplink to Hibernate EntityManager. The problematic code looks like this (it is running fine under Toplink):
@SequenceGenerator(name="idgenerator", sequenceName="idgenerator", allocationSize=1 ) // BUG in build 48: allocationSize is not avaluated -> The sequence named [idgenerator] is setup incorrectly. Its increment does not match its pre-allocation size.
@MappedSuperclass
public abstract class AbstractEntity implements Serializable, Visitable {
@Id
@Column(name = "SURROGATE", nullable = false)
@GeneratedValue( strategy=GenerationType.SEQUENCE, generator="idgenerator" )
protected int surrogate;
I encounter the follwing Exception during deployment
org.hibernate.AnnotationException: Unknown Id.generator: idgenerator
at org.hibernate.cfg.BinderHelper.makeIdGenerator(BinderHelper.java:392)
The id (here called surrogate) should remain in this abstract superclass. Is there a workaround for this bug ?
Many thanks,
Mike
|