I have implemented an IInterceptor in our repository, because have some processing that needs to take place after an object is loaded. If a transaction is not involved, OnLoad is called, however, NHibernate has not yet populated the object. I was not expecting this behavior, since everything I've read about IInterceptor indicates that OnLoad is called after NHibernate has already loaded the object.
Now, if I use a transaction, after the transaction is complete, I have a fully populated object, but we don't always use transactions.
Am I flat out misunderstanding how this works, or is there another reason why OnLoad is being called, when the object has not actually been loaded by NHibernate?
If you need any more details, let me know, but hopefully I've explained the problem well enough.
Thank you,
D.
|