RavenDB Include - Session.Load <T> (line [] ids)

Is there a reason why I cannot perform Include to include a collection of documents from the request, and then load them all into one request, 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)); 

It seems to go back to the database to retrieve objects, not to use the cache ... is this by design or can it be fixed?

Floor

+4
source share
2 answers

Paul, I just applied for a request. I think you will find this in one of the upcoming collections.

+3
source

Pavel, This is because optimization is not implemented, thatโ€™s all. A tensile request for this will be appreciated.

+2
source

Source: https://habr.com/ru/post/1393557/


All Articles