Community
Participate
Working Groups
1. I declared an entity class to use Property Access by put @Id Annotation on Getter Methods 2. the entity class using @IdClass annotation and declared as JavaFX property format. 3. the id class declared as JavaFX property format also. 4. when using EntityManager.find(<id class object>), the EntityManager can not get result 5. I debug and debug, then found that the EclipseLink always use FieldAccess for the Id Class object even the Entity Class set to Property Access 6. Please see org.eclipse.persistence.internal.jpa.CMP3Policy source code: it use PropertyAccess only if NoSuchField in Id Class: try { pkAttributes[i] = new FieldAccessor(this, getField(currentKeyClass, fieldName), fieldName, field, mapping, currentKeyClass != keyClass); fieldToAccessorMap.put(field, pkAttributes[i]); noSuchElementException = null; } catch (NoSuchFieldException ex) { String getMethodName = null; String setMethodName = null; ..... }
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink