Can you show us the mapping and code? The collection will NEVER be null after the parent object is loaded by NHibernate.
In my tests, this works perfectly and doesn't cause an additional select: var parent = session.Get<Parent>(parentId); Assert.IsNotNull(parent.Children); Diego On Tue, Dec 8, 2009 at 15:56, Rich <[email protected]> wrote: > Anyone know of a way around the following issue? > > We attempt to lazy load a collection of sub objects that reside under > the primary object. > > When we reference the object, NHibernate correctly fetches the object. > We then attempt to check if the collection of subobjects is null; this > seems to force a fetch of the subobjects. > > Is there a way around this? > > Thanks, > -Rich > > -- > > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > > -- 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.
