Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.2.0
-
None
-
None
-
Mac OS X 10.7.3, Java 1.6.0_31, OpenJPA 2.2.0, JavaDB/Derby 10.5.3.0
Description
If an abstract entity class (marked as @MappedSuperclass) is extended by a concrete entity class and the abstract entity is not include in the persistence.xml as a managed class, OpenJPA incorrectly maps the entity fields.
Based on the SQL trace messages, it would appear that there are two different internal arrays representing the entity fields. The StateManagerImpl._metafield contains an array of all fields on the given entity. However, when the actual field data is fetched, a different backing array of fields is used and it does not match the _metafield array. As a result, the wrong field is updated/fetched.
Attached is a simple maven/junit test case.