However when accessing UserAccount resource we may need to suppress xml generation for UserAccountProfile. Solution is to use
@XmlTransient/**
* @return the useraccount
*/
@XmlTransient
public Useraccount getUseraccount() {
return useraccount;
}
I have Annotated getUserAccount in the Entity Order.java. This annotation does not work with fields.
Adtionally you can use @ManyToOne(fetch = FetchType.LAZY) to avoid the database call :)
Applies to : Jboss,JAX-WS,RestEasy,JPA,Hibernate