This is an elaboration and clarification of this question.
Suppose I have two tables, Foo
and Bar
.
Bar
has a FK to Foo
.
In the application, the tables are represented by classes and Foo
has a list of Bar
s.
Bar
has a property for the id of the Foo
it has a FK to in the database.
In the context of a Session
and Transaction
with IsolationLevel.ReadUncommitted
, I add an instance of Foo
to the database, assign the generated id to the Foo_id
property of an instance of Bar
and also add it to the database.
Now, before calling Transaction.Commit()
, is it possible to have NHibernate read out Foo
with a list of Bar
from the database? That is, read the data uncommitted?
I have created a VS2012 project which demonstrates this. It includes a SSDT project for building the required database and has tests showing what I asking about.
Thank you.