When a parent-child (Head-detail) relationship exists for both parties, and Cascade is All-delete-orphan, the parent object has the following features:
1. When the parent object is saved or updated, Cascade saves or updates all associated child objects, equivalent to Cascade Save-update
2. When the parent object is deleted, Cascade deletes all associated child objects, equivalent to cascade delete
3. Delete all child objects that are no longer associated with the parent object
Usage Supplement:
1. When a delete is made to a detail that has been updated by another person, the normal processing, sending SQL, does not appear the object does not exist the hint.
2. When updates are made to the detail that have been updated by others, the updatecounter of the head is inconsistent and prompts the multi-user to operate.
Even if the head of the Updatecounter modified to the latest value will also be due to detail of updatecounter inconsistent, prompt multi-user action prompts.
3. When a delete is made to a detail that has been physically deleted, it is normal but does not send SQL.
4. When the detail updatecounter is null, the head object inserts the update's detail data as the new data.
Rather than the update operation.
Possible occasions for Updatecounter null:
1. The picture is not taken into
The project property of 2.jsp does not correspond to the properties of the Resultmodel, causing the screen to be not successfully assigned a value
Cascade several values:
Save-update: Cascade Save (if a child object has been updated after load, it will also cascade updates). But it doesn't cascade delete
Delete: Cascade Delete, but no cascading save and update
All-delete-orphan: Automatically deletes child objects that are not part of the parent object when the parent-child relationship is lifted, and also supports cascading deletes and cascading save updates.
All: cascading deletes, cascading updates, but child objects are not automatically deleted when the parent-child relationship is lifted.
Delete-orphan: Deletes all objects associated with the current object disassociate
None: Cascade operations are not performed in all cases, default values.