Is there a reason why I can’t perform an Include to include a collection of documents from a query, then load them all in one query, rather than using a for-loop.
var messages = Session.Query<MessageRecipient, MessageInboxIndex>()
.Include(x => x.MessageId)
.ToList();
Session.Load<Message>(messages.Select(x => x.MessageId));
This seems to go back to the database to fetch the objects rather than use the cache…is this by design or can it be fixed?
Paul
Paul, I just submitted a pull-request for that. I guess you will find this in one of the upcoming builds.