[jboss-user] [EJB 3.0] - Re: deleting entities from a Collection

laszlo.fogas do-not-reply at jboss.com
Sun Sep 10 10:02:26 EDT 2006


define a hibernate specific annotation, because this kind of deleting ejb3 spec does not support. In hibernate it's delete_orphan cascade type..

use 


  | @OneToMany(fetch = FetchType.LAZY, mappedBy = "felhasznalok")
  | 	@org.hibernate.annotations.Cascade( {
  | 			org.hibernate.annotations.CascadeType.ALL,
  | 			org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
  | 	public Set<Kedvencek> getKedvenceks() {
  | 		return this.kedvenceks;
  | 	}
  | 
  | 

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

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



More information about the jboss-user mailing list