Hello,
I have a problem with using @TypeDef and @MappedSuperClass, @TypeDef does not seem to be seen from the child classes (the @Entity ones) here is an example:
Code:
@MappedSuperclass
@TypeDef(name="GUID",typeClass=GUIDAsString.class)
public abstract class MyEntity {
@Id
@Type(type="GUID")
@Column(name="id", nullable=false)
public GUID id = null;
}
@Entity()
@Table(name="COOL_ENTITY")
class CoolEntity extends MyEntity {}
and I get this when deploying it :
Code:
org.hibernate.MappingException: Could not determine type for: GUID, at table: COOL_ENTITY, for columns: [org.hibernate.mapping.Column(id)]
Why does this happen? I am using Hibernate 3.5.3-Final.
Thanks,
Gabriel