Using TABLE_PER_CLASS (unfortunately) we are having an issue converting to annotations. Here are the mappings for two of the classes in the hierarchy:
Hibernate version:
core 3.2.5, annotations 3.2.1
Mapping documents:
Code:
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Table(name="value")
@Proxy(lazy=false)
@Entity
@Table(name="stringvalue")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Proxy(lazy=false)
@Embeddable
@PrimaryKeyJoinColumn(name="cdfvalue_guid")
(we added the @Inheritance annotation to the subclass, but have also tried it without that annotation)
Here is the Warning output we get Code:
[exec] 21:27:04,515 WARN [AnnotationBinder] Root entity should not hold an PrimaryKeyJoinColum(
s), will be ignored
[exec] 21:27:04,515 WARN [AnnotationBinder] Root entity should not hold an PrimaryKeyJoinColum(
s), will be ignored
What does this error mean? If the PrimaryKeyJoinColumn does not join up the superclass table with the subclass tables, how should we specify the join?
The annotation docs do not fully document this mapping style (only the superclass mapping is indicated). Can someone point us to an example of TABLE_PER_CLASS, or post a working mapping with annotations?