to get that behavior you want to configure the collection mappings
with fetch="select" batch-size="100". you can adjust the 100 value to
something that works for your scenario. then simply select the root.
var foos = session.CreateCriteria<Foo>().Add(...).List<Foot>();

when you iterate over foo.Bars and Bar.Bazes it will load the data in
batches
var bazes = foos.SelectMany(foo=>foo.Bars.SelectMany(bar=>bar.Bazes));

On Dec 14, 11:13 pm, acl123 <[email protected]> wrote:
> I am trying to eagerly fetch collections using selects, but all I am
> getting is *inner* joins. What is going on?
>
>     Session.CreateCriteria(typeof(Foo))
>         .SetFetchMode("Bars", FetchMode.Select)
>         .CreateAlias("Bars", "b")
>         .SetFetchMode("b.Bazes", FetchMode.Select);
>
> I have tried changing FetchMode to Eager but that doesn't work - I
> still get inner joins instead of seperate selects.
> Is this possible?

--

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