user1810737
user1810737

Reputation: 234

Cannot import EclipseLink MOXy

I downloaded the latest EclipseLink (2.4) and put the eclipselink.jar in my folder. However, I do not see the @XmlInverseReference annotation anywhere and I cannot import org.eclipse.persistence.oxm.*;

What am I doing wrong? I am using Netbeans 7.2.1.

Alternatively, what might be a good alternate solution for bidirectional relationships with JAXB annotations? I have a Parent and a Child class, Child has a reference to Parent because of JPA foreign key. As soon as I unmarshal, the reference is gone.

Upvotes: 1

Views: 723

Answers (1)

bdoughan
bdoughan

Reputation: 149047

UPDATE

I created a Web Application using NetBeans 7.3 and all I needed to do to include EclipseLink was right click the Libraries icon in the Project panel and choose Add Jar/Folder... and then subsequently point at the eclipselink.jar in the EclipseLink install.


The import for @XmlInverseReference is the following:

import org.eclipse.persistence.oxm.annotations.XmlInverseReference;

For More Information

Upvotes: 1

Related Questions