Hi - I have two entities A and B, where A has a bag of B's:

class A {
  public IList<B> Bs { get; set; }
}

A.hbm.xml file:

 <bag name="Bs" inverse="true" cascade="all" lazy="true">
    <key column="aId" />
    <one-to-many class="B" />
 </bag>

Is it possible to have NHibernate load all the B instances the first
time I use the associated IList on A ?

Reading the documentation it seems to me that the only way to have
NHibernate load it all is to use fetch="join" in the mapping file, but
that would load everything whenever A is loaded, and I do not want
that.

Cheers,
Thomas
--~--~---------~--~----~------------~-------~--~----~
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