Jump to: navigation, search

EclipseLink/DesignDocs/293925/XMLCompositeDirectCollectionMapping

XMLCompositeDirectCollectionMapping

Provide support for XML direct collection mappings via xml-element and xml-attribute.

Open Issues

  • XPath - should we overload the name attribute on xml-attribute and xml-element to set the XPath, or create a new attribute xml-path?
    • The current approach is to use xml-path and NOT overload name, as name is not intended to be used in this manner
  • Container Policy - JPA does not currently support container policy in their eclipselink_orm schema; the correct container policy is determined based on the property's type. Given that we are trying to keep in line with JPA, should we:
    • support neither collection class nor container policy?
    • support only collection class?
    • support only container policy?
    • support both collection class and container policy?

Example: XMLCompositeDirectCollectionMapping

The following example will demonstrate how to configure an XMLCompositeDirectCollectionMapping using XPaths via XML Metadata:

org.example.Employee.java

package org.example;
 
public class Employee {
}

Deployment XML

 

XML Metadata

 

XML Instance Document