jax-b xml inverse reference with many to many relationship

江枫思渺然 提交于 2019-12-05 13:34:17

Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB (JSR-222) expert group.

@XmlInverseReference is a EclipseLink JAXB (MOXy) extension that enables you to map bidirectional relationships:

@XmlInverseReference serves two roles:

  • During marshalling it prevents an infinite loop from occurring. If a bidirectional relationship exists between Foo and Bar, it will marshal Foo then Bar and then it will stop before trying to marshal Foo again.
  • During unmarshalling it will populate the back pointer.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!