[jboss-user] [EJB 3.0] - Re: Strange behaviour wit 1:n collection with EJB 3.0 and To

Wolfgang Knauf do-not-reply at jboss.com
Tue Oct 30 06:36:03 EDT 2007


Hi !

normally, you have to update both sides of a relation if it is bi-directional. So, if you want to add a BuildingsProd to a Planet, you have to do two things:

a)
BuildingsProd b = new BuildingsProd();
planet.getBuildingsProdList().add(b);

b)
b.setPlant (planet)

Hope this helps

Wolfgang

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100162#4100162

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100162



More information about the jboss-user mailing list