Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348420

Summary: [Validation] @XmlIDREF validation
Product: [WebTools] Dali JPA Tools Reporter: Paul Fullbright <paul.fullbright>
Component: JAXBAssignee: Neil Hauge <neil.hauge>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge
Version: 3.0Keywords: plan
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Paul Fullbright CLA 2011-06-06 11:25:25 EDT
From the JAXB 2.2 spec (8.9.12.2)

- If the type of the field or property is a collection type, then the collection item type must contain a property or field annotated with @XmlID.
- If the field or property is not a collection type, then the type of the property or field must contain a property or field annotated with @XmlID.
  Note: If the collection item type or the type of the property (for non collection type) is java.lang.Object, then the instance must contain a property/field annotated with @XmlID attribute.
- The only additional mapping annotations allowed with @XmlIDREF are: @XmlElement, @XmlAttribute, @XmlList, and @XmlElements, @XmlJavaTypeAdapter.

If the type of the field or property is a collection type, then each collection item type must be mapped to xs:IDREF.

If the type of the field or property is single valued, then the type of the property or field must be mapped to xs:IDREF.
Comment 1 Paul Fullbright CLA 2011-10-28 16:47:37 EDT
Committed for 3.1 M3