Summary

Being able to store new data or update existing data in the database is an important milestone in our NHibernate journey. In this chapter, we learned how to save transient entities and how to update persistent entities. We also learned how transitive persistence and cascading of operations takes a lot of complication away from your data access layer. We then looked at subtleties around different cascade styles and hopefully know more about when to use which cascade style. Bidirectional associations make working with code easy but they may add challenges to saving the data. It always helps to use convenience method that would transparently set both ends of bidirectional association. One of the most important take away from this chapter ...

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.