| Summary: | Two mappings shown up in the JAXB content for a field/property | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Nan Li <nan.n.li> |
| Component: | JAXB | Assignee: | dali.general-inbox <dali.general-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
OK. This is a valid case based on the spec. (8.12.5 Property / Field). |
Build Identifier: I20110428-0848 Given a class like the one below: @XmlAccessorType(XmlAccessType.PROPERTY) <-- @XmlType(name="test") public class Test { @XmlAttribute <-- private int id; public int getId() { return id; } public void setId(int id) { this.id = id; } } If annotating a field (id in this example) with @XmlAttribtue or @XmlElement, you would get two mappings for that field in the JAXB content if not specifying @XmlAccessorType annotation or specifying the access type as PROPERTY with @XmlAccessorType(XmlAccessType.PROPERTY). Reproducible: Always