| This might be a duplicate of HHH-12601 Open , but the code mentioned in that ticket is completely different from the one I encountered while analyzing the problem, so I'm not sure. When you define a public field in a mapped superclass or in an entity superclass, inherited by an entity class:
@Entity(name = "entitySuper")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public static class MyEntitySuperClass {
@Id
@GenericField
public Integer id;
}
@Entity
@Indexed
public static class MyEntity
extends MyEntitySuperClass {
@Basic
public String name;
}
And access the id defined in the superclass on an instance of the child class:
MyEntity entity1 = new MyEntity();
entity1.id = 1;
Then enhancement of the code above will fail with this error:
|