Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348420 - [Validation] @XmlIDREF validation
Summary: [Validation] @XmlIDREF validation
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-06-06 11:25 EDT by Paul Fullbright CLA
Modified: 2011-10-28 16:47 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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