Community
Participate
Working Groups
When an xml-mapping-metadata-complete flag is set, all entities across the persistence unit should be metadata-complete and any metadata-complete=false from an entity, embeddable or mapped superclass should be ignored. This is written in the spec, section 11.1 "If xml-mapping-metadata-complete is specified and XML elements are omitted, the default values apply. These default values are the same as the corresponding defaults when annotations are used, except in the cases specified in Section 11.2 below. When the xml-mapping-metadata-complete element is specified, any metadata-complete attributes specified within the entity, mapped-superclass, and embeddable elements are ignored." Example: <persistence-unit-metadata> <xml-mapping-metadata-complete/> </persistence-unit-metadata> <entity class="Hammer" metadata-complete="false"> <attributes> <id name="id"> <column name="ID"/> <generated-value/> </id> </attributes> </entity> public class Hammer extends Tool { public int id; // ===>> This column name should not get picked up and should default to color. @Column(name="IGNORED_COLOR") public String color; public Hammer() {} }
Created attachment 184178 [details] Proposed changes
Created attachment 184252 [details] Updated patch (missed adding some new files)
Created attachment 184256 [details] Updated patch 2 (missed adding more new files)
Changes have been submitted. Reviewed by: Tom Ware Tests: New test suite (EntityMappingsMetadataCompleteJUnitTestCase) added. New test model (jpa/xml/metadatacomplete).
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink