Hibernate version: 3.0.5
Mapping documents:Annotations
Hello
I'm using annotations for Hibernate and found a problem with my test application. I have a superclass containing id and version property:
Code:
public abstract class BaseObject implements Serializable {
private Integer id;
private int version;
@Id(generate = GeneratorType.AUTO)
public Integer getId() { return id; }
protected void setId(final Integer id) { this.id = id; }
@Version
@Column(nullable = false)
public int getVersion() { return version; }
public void setVersion(final int version) { this.version = version; }
}
Then i created a entity class :
Code:
@Entity
public class Category extends BaseObject {
private String colour;
@Column(nullable = false, length = 6)
public String getColour() { return this.colour; }
public void setColour(String colour) { this.colour = colour; }
}
This works with Hibernate Annotations 3.0 beta 2 Preview. But it no longer works with the newest source from cvs (June 15, 2005). This error message appears:
org.hibernate.AnnotationException: No identifier specified for entity: Category at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:494)
Any ideas what i'm doing wrong?
Code: