[jboss-user] [EJB 3.0] - Re: Foreign key reference with cascading delete

Wolfgang Knauf do-not-reply at jboss.com
Thu Oct 19 06:06:39 EDT 2006


Hi Juergen,

In your entity "ListEntry" the cascade should/might look like this: 
@OneToMany(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
  | User getUser(){...


If you specifiy "REMOVE" then the user is deleted if the list entry is removed.

Best regards

Wolfgang

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

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



More information about the jboss-user mailing list