Hi, Oskar!

I just came across something weird with the latest trunk version:

Customer c = session.Load<Customer>(1);     //Customer is lazy, so a proxy 
is returned
Order o = session.Get<Order>(1);                  //Order is lazy, but I'm 
loading it explicitly
Debug.Assert(c is IProxy);                             //OK
Debug.Assert(o is IProxy);                             //OK
Debug.Assert(o.Customer is IProxy);              //OK
Debug.Assert(o.Customer == c);                    //failure

In recent versions (3.x), there was no failure, I have just checked. All 
entities are lazy and the Customer property is mapped as NoProxy (which is 
a proxy anyway).
My question is: shouldn't the instance returned by Load<T> and the Customer 
property be the same?
I'm not sure this is an error, but it is a change from previous versions - 
I had this Assert since always, and it never threw.

Thanks!

RP

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to