NHibernate offers several cascading options. Consider the behaviour of each, and choose the best option for your app.
- delete – If an object is deleted, delete all associated objects.
- delete-orphans – If an object is deleted, delete all objects associated to it. Also when an object is no longer associated with another object, delete it.
- all-delete-orhpans - If an object is saved, deleted, or updated, check associated objects and save, delete, or update them. Also when an object is no longer associated with another object, delete it.
- save-update – When an object is saved or updated, save or update any associated objects that are now dirty
- all – If an object is saved, deleted, or updated, check related objects and save, delete, or update them
- none – Let’s developers handle cascades by themselves.
Read more: <MCGUIRE::code>
QR: ![Inline image 1](http://chart.googleapis.com/chart?chs=80x80&cht=qr&choe=UTF-8&chl=http://splatto.net/portfolio/blog/post/2010/03/30/NHibernate-Cascade-Options-Explained.aspx)