Transitive persistence/cascading in action
In this section, we are going to look at a select few persistence situations to explore the transitive persistence and cascading in detail. We will not be able to explore each and every possible scenario, so we are going to be looking at the following few and understand in detail how these play out under the hood. Understanding these examples should give you enough knowledge to understand any code for any complex scenario:
- Saving a transient entity with association to one or more other transient entities
- Updating a persistent entity with one or more associations added/removed
- Deleting a persistent entity with one or more associations set
Let's get started then.
Saving a transient entity with association to ...
Get Learning NHibernate 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.