cancel
Showing results for 
Search instead for 
Did you mean: 

JPA one to many relationship and serialization

Former Member
0 Kudos

Hi,

I modeled a one to may relationship like this:

Parent Class WFData:

@OneToMany(mappedBy = "wfData", targetEntity = Positionen.class)

private Set<Positionen> positionen;

Child Class Positionen

@ManyToOne

@JoinColumn(name = "WF_REF_ID", referencedColumnName = "ID")

private WFData wfData;

Now I want to create an EJB session bean with a method which returns an object of type WFData (parent) published as web service . When I try to deploy the web service I get the following error message: Unable to generate serialization framework for web service

Does anyone know how to serialize a one-to-many relationship so I can use these objects in a web service?

Best regards,

Kevin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I found the solution to get serialization correctly working and enable the service to be used in Visual Composer.

You need to add the tag @XmlTransient to the getter method of the attribute in the child class that references the parent.

@XmlTransient

public WFData getWfData() {

return wfData;

}