And probably it would work with inlined query:
var userids = ( from user in session.Query<User> ()
where user.Name.StartsWith ("a") && user.Phones.Any ()
select user.Id)
.Take (100); // there is no .ToArray() call
var usersWithPhones = session.Query<User>()
.Where(u=>userids.Contains(u.Id))
.Fetch(u=>u.Phones)
.ToArray();
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/GkH_Y9nLXtIJ.
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.