[jboss-user] [JBoss Seam] - Re: ManyToOne OneToMany

mtpettyp do-not-reply at jboss.com
Wed Aug 8 17:22:52 EDT 2007


More of a EJB3 question, but I think you need to change:


  |  @OneToMany(mappedBy="workout", cascade=CascadeType.REMOVE)
  |   private List<Workout> workouts = new ArrayList<Workout>();
  | 

to 


  |  @OneToMany(mappedBy="athlete", cascade=CascadeType.REMOVE)
  |   private List<Workout> workouts = new ArrayList<Workout>();
  | 

You need to specify the field in the Workout entity which maps back to this object.

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

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



More information about the jboss-user mailing list