Order of operations

When you save an instance of a complex entity such as Employee which may have associations to several other entities, NHibernate has to do a lot of work to figure out how to insert/update/delete particular database records. It is important to not only generate correct set of SQL statements to get the work done, but it is even more important to fire these SQL statements in right order. With complex database table structures with lot of foreign key associations, it may be daunting to figure out right order of running a set of SQL statements. NHibernate makes the job easy for us by using the following order to ensure that SQL statements always go in right order:

  1. All entity insertions in the same order they were passed into the ...

Get Learning NHibernate 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.