...or at least an annoying, missing exception.
Let's say you have the following entities..
class A : IOne, ITwo
[propsFromIOne]
[propsFromITwo]
class B : A
[concreteProps]
...and these properties are mapped. In pseudo code something like this is done:
[startTrans in ISession]
b=new B()
Commit()
Evict(b)
bCopy = Load<B>(b.Id)
bCopy.SomeLazyLoadedPropertyFromIOneOrTwo
...and the property above is always null.
I sat with this problem many hours scratching my head clean and looked at very low level to see what the **** was going on. After millions of tests it turned out to be a mistake from my side. The properties in IOne and ITwo were not set to virtual that messed the proxy up. However! - no exception whatsoever! As soon as I removed one of the interfaces, a nice exception popped up. More than one interface implemented on a class - no exception if virtual keyword is forgotten.
Finally... Thanks for a great product! This is the first "non productive hours cause of sick product behaviour I've had so far".
I'm using nhibernate 1.2 GA
|