org.eclipse.persistence.oxm.annotations
Annotation Type XmlInverseReference
@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface XmlInverseReference
This annotation is used to map a back-pointer. When configuring an
XmlInverseReference, the "mappedBy" attribute must be set to the field
on the reference class that maps to this field. For example:
@XmlRootElement(name="employee")
public class Employee {
...
@XmlElementWrapper(name="phone-numbers")
@XmlElement(name="number")
public List<PhoneNumber> phoneNumbers;
...
}
public class PhoneNumber {
...
@XmlInverseReference(mappedBy="phoneNumbers")
public Employee owningEmployee;
...
}
Required Element Summary |
java.lang.String |
mappedBy
|
mappedBy
public abstract java.lang.String mappedBy