I have implemented IPostLoadEventListener and in this listener, for a
specific parent object, I want to populate some data fields in that
object, as well as some of the data in that parent's child
collections.

I have two issues that I need to resolve:

#1 - when I access the child object collections, NHibernate recurses
out of that call and goes and loads the child. I would expect this to
happen if Lazy loading was enabled, but it's not. Is this expected
behavior?

#2 - after the parent object loads, then all the children are loaded,
but if I need to populate some of those child collections with data,
for that specific parent object type, how do I determine that the
object coming through the Load Event Listener belongs to the patient
object I am trying to load data for (hoping there is a field I can key
off of).

More specifically, we want to inject specific data into our DTO after
it's read through NHibernate. I had thought doing this in a PostLoad
event would have already hydrated the entire object, child collections
and all, if lazy loading were disabled, but that doesn't appear to be
the case.

Advise more welcome.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to