| Summary: | Allow the key/value XPaths for Map properties to be customized | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | paul.fullbright |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Note: The representation should match the support in oxm.xml for maps. This annotation should also allow for the key/value types to be specified. The OXM should also allow the key/value XPaths to be set. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Currently for a Map property, the XML representation is always the same: For the property: public Map<String, PhoneNumber> phoneNumbers = new HashMap<String, PhoneNumber>(); You get the XML: <phoneNumbers> <entry> <key>work</key> <value>613-555-1111</value> </entry> </phoneNumbers> Metadata should be available to customize this, possibly: @XmlMap(wrapper="my-entry", key="@my-key", value="my-value") public Map<String, PhoneNumber> phoneNumbers = new HashMap<String, PhoneNumber>(); Then you could get the XML: <phoneNumbers> <my-entry my-key="work"> <my-value>613-555-1111</value> </my-entry> </phoneNumbers>