2 Replies Latest reply on Jun 24, 2007 3:03 PM by Dennis Przybyla

    Bidirectional Cascade

    Dennis Przybyla Novice

      When you put declare a bidirectional relationship in a OneToMany and ManyToOne relationship and put a cascade=CascadeType.ALL on the OneToMany declaration is the cascade in both directions or only on the OneToMany relationship? In other words if I have a airplane with passangers and I remove a passenger will it delete the airplane?

      And how do I get it to set a ManyToOne relationship null if the otherside is deleted?

      I have been working with Cascades but I just can't seem to get it to work right.

      Thanks in advance,
      Dennis Przybyla