Community
Participate
Working Groups
Build Identifier: I-3.4.0-20111117042436 Runtime complains incompatible access type under some cases when defining entities with field-based access on property or property-based access on field. Here are a couple of such cases: Case 1: @Entity @Access(AccessType.FIELD) public class Test implements Serializable { private int id; private static final long serialVersionUID = 1L; public Test() { super(); } @Id @Access(FIELD) public int getId() { return this.id; } public void setId(int id) { this.id = id; } } Case 2: @Entity @Access(AccessType.PROPERTY) public class Test implements Serializable { @Id @Access(AccessType.PROPERTY) private int id; private static final long serialVersionUID = 1L; public Test() { super(); } public int getId() { return this.id; } public void setId(int id) { this.id = id; } } At least a warning message should be given to remind the potential problem during runtime. Please note that runtime won't complain once specifying property-based access to the property regardless what else is specified. Reproducible: Always