Community
Participate
Working Groups
This bug targets supporting the new ElementCollections in the JPA 2.0 specification. See http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/new_collection_mappings for details
Created attachment 118199 [details] Core patch This patch contains the necessary changes in core so that jpa 2.0 element collections could be supported: 1. Allow several AggregateCollectionMapping to have the same target class - the target AggregateCollectionDescriptor is now cloned (as it was always the case for AggregateObjectMapping descriptor). 1.1 Defined addFieldNameTranslation method in AggregateCollectonMapping that allows to map the field defined in the target AggregateMappingDescriptor to the actual field. Note that it supports inheritance - use this method to translate the fields of the target class subclasses as well. 1.2 Defined addNestedFieldNameTranslation method in AggregateCollectonMapping that allows to map the field defined in the nested target AggregateMappingDescriptor to the actual field (this method also supports inheritance). 2. Allows AggregateDescriptor to be used as a target of AggregateCollectionMapping: the cloned AggregateDescriptor type is changed to AggregateCollectionDescriptor, all fields (other than class indicator) are primary key fields. The patch contains several tests, the new exceptions not yet defined. Note that the new AggregateCollectionMethods are not currently compatible with project.xml.
Created attachment 118321 [details] Slightly updated Core patch Patch updated following James's comments.
Created attachment 124036 [details] Code changes - part 1 These are the code changes, part 1 to support the ElementCollection annotation, namely support for element collections of basics and embeddables. Things to come: - MapKeyClass/MapKeyJoinColumn support - Join-table support with association override - Support of dot notation on overriders for nested embedded attributes - key. and value. support with overriders - More exceptions and log messages - OrderColumn support - Converter support for element collection map key value
Part 1 patch has been submitted. Reviewed by: Tom Ware Existing model and tests from the inherited (annotation) model were expanded to test the new element collection and then those same tests and model changes were copied over to the xml inherited model and tests to verify the xml configurations. Test suites: - org.eclipse.persistence.testing.tests.jpa.inheritedInheritedModelJunitTest - org.eclipse.persistence.testing.tests.jpa.xml.inherited.EntityMappingsInheritedJUnitTestCase
Is this bug off the table now for 1.1?
Thanks Peter, since the annotation and xml are all Dali is concerned with, we will take this off the table for our EclipseLink 1.1 support.
Created attachment 124985 [details] Code changes - part 2 Patch includes: - dot notation support on attribute overrides for embedded and element collection (both directly and through descriptor level specifications applied to mappings from a mapped superclass) - new test model changes to verify - numerous code cleanup/improvements Dot notation should also work for association overrides since they go through more or less the same code path. No new tests/model changes this round but will be provided in the next patch with more element-collection features.
This bug is being closed down for the 1.1 release. The continuation of this bug (namely the metadata processing part) is through bug 265359. Any metadata processing patches that have been added here were not included in the 1.1 stream and will be available from the main stream.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink