Out of curiosity, does anyone know if EJB3 is planning on supporting the hibernate delete orphan functionality?
When using EJB3 I'd rather not have to use hibernate annotations if I don't have to (seems more "pure" and more cross-platform).
Having the following is annoying:
Code:
@OnDelete(action=OnDeleteAction.CASCADE)
@OneToMany(cascade=CascadeType.ALL, mappedBy="property")
@JoinColumn(name="folderId")
@Cascade({org.hibernate.annotations.CascadeType.ALL,
org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
How does Sun recommend doing this? I tried a uni-directional one-to-many (no many-to-one), and hibernate tried to null my fk instead of deleting the child object.