Community
Participate
Working Groups
I came across a couple issues in the PrimaryKeyMetadata class. 1 - The cacheKeyType is never read from the annotations. The following line should be added to the constructor for annotation processing: m_cacheKeyType = (String) primaryKey.getAttribute("cacheKeyType"); 2 - in the process method, the wrong validation exception is thrown if the user does not specify a name on one of the primary key columns, that is: ValidationException.optimisticLockingSelectedColumnNamesNotSpecified(descriptor.getJavaClass()); A new exception should be created as this one does not make sense in this context and would be very confusing to the user. Also, is the usage of a @PrimaryKey exclusive, in that it should not be used in conjunction with other JPA id mappings (@Id, @EmbeddedId, @IdClass, derived id's)? I suspect it does not make any sense for most but I don't see anything preventing users from doing this.
Setting target and priority. See the following page for information about what these settings mean: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
I already corrected the first point in a previous transaction. I'll include a patch to correct the second point shortly.
Created attachment 181871 [details] Porposed changes
Changes have been submitted. Reviewed by: Chris Delahunt Manually tested to verify the exception and new model change/addition to fieldaccess.advanced to test pk metadata override of mapped superclass.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink