Cascade:
Cascading: An object's chain operation
Cascade Save:
Cascade Save: When you save a party to a bidirectional relationship, the error is reported by default, and you should set the Cascade save in Customr, that is, when you manipulate an object by manipulating other associated objects
Configure the cascading update at the customer end:
cascade= "Save-update" class
In the test case, the value is manipulated for customer:
Cust.getorders (). Add (O1); Cust.getorders (). Add (O2); Session.save (Cust);
Cascade Delete:
Cascade Delete:
If you do not set a cascade delete, the foreign key of the data is set to NULL when the column information is deleted
If cascade Delete is set, the data associated with the foreign key is deleted when the information is deleted
Configure cascade Delete on the customer side:
cascade= "save-update, delete" class= "Com.roxy.hibernate.pojo.Order"/> </set>
Or
<set name="Orders" cascade="All"
Hibernate--cascade Cascade