Hello, I found strange behavior of Metamodel Generator when child entity hasn't own access type annotation. For example, we have a java parent class like this: {code:java} @Entity @Getter @Setter @Table(name="CUSTOMER") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "ENTITY_ID", discriminatorType = DiscriminatorType.INTEGER) @Access(AccessType.FIELD) //Access by fields public class Customer {
private Integer id;
@Id @Column(name = "CUSTOMER_ID") @GeneratedValue() @Access(AccessType.PROPERTY) //Override for id field public Integer getId() { return id; }
@Column(name = "CUSTOMER_NAME") private String name; {code} and child class like this: {code:java} @Entity @DiscriminatorValue("1") //@Access(AccessType.FIELD) /* Uncomment to fix the bug */ public class Client extends Customer{ } {code} When Metamodel Generator process entities he skip skips field "name" in static metamodel because he choose AccessType.PROPERTY from getId() method.
I have created demo app with this bug to fast reproducing of this bug: [^generror.zip] |
|