Is it possible to tell JAXB to create Hibernate bidirectional mapping?
Holding class can have many Policy children.
To pass Parent’s PK to Child’s FK, I have to set
policy.setHolding(holding)
and then I can say
session.save(holding)
But it doesn’t work when I am marshalling XML to Holding object using JAXB.
More details can be found here
Note: I’m the EclipseLink JAXB (MOXy) lead and a member of the JAXB (JSR-222) expert group.
You may be interested in the
@XmlInverseReferenceextension in EclipseLink JAXB (MOXy) for supporting this use case. Below is an example:Customer
Address
For More Information