1 Reply Latest reply on Apr 20, 2005 5:14 AM by Emmanuel Bernard

    removing entities from OneToMany relationship

    Peter Kozelj Newbie

      As has been pointed out by Emmanuel Bernard in http://www.jboss.org/index.html?module=bb&op=viewtopic&t=62238
      the delete-orphand hibernate cascade isn't suported by the spec.

      But shouldn't the child entity beans be at least orphaned when removing them from the collection on the parent side?

      I have tried both uni and bi-directional mapping but the foreign key remains unchanged after parent.getChildren().remove(0).

      Even more, merge() method returns parent entity without the removed child (as one would expect), which makes it inconsistent with the database.