What is cascading

Cascading is the process of applying the operation happen on the parent to all the childs.


ex: If we apply the delete cascade operation then when parent object is deleted all the associated child objects will be deleted automatically.


Possible values are :----    

  • all
  • |none
  • save-update
  • delete
  • all-delete-orphan

Default value is none.


eg: Set<Long> phones;


<set name="phones" table="phones" cascade="delete">
------
</set>

0 comments :

Post a Comment