3 Replies Latest reply on Feb 16, 2006 5:01 AM by Emmanuel Bernard

    Cascade Delete on 3 Entities not working

    ppc Newbie

      I've 3 Entities

      A have a @OneToMany (cascade = CascadeType.ALL,...) with B
      B have a @OneToMany (cascade = CascadeType.ALL,...) with C

      If I create A and B
      then i can delete A (B is also deleted)

      if I create B and C
      then I delete B (C is also deleted)


      if I Create A, B and C
      I got and org.hibernate.exception.ConstraintViolationException on B
      when I try to delete A

      in the logs seam that hibernate is not considering that B has also a cascade delete.