Replies: 3 comments 4 replies
-
I don't think so, because of @sebastienros correct me if I'm wrong |
Beta Was this translation helpful? Give feedback.
-
ListAsync executes query and returns data, everything after ListAsync is just c# objects and you can use Linq to filter |
Beta Was this translation helpful? Give feedback.
-
I assume one could expect it to work, so probably should be treated as a bug. It's possible that calling ListAync is mutating the query internally and could instead clone the state before doing so, or do it in a way that wouldn't change the underlying constraints. Something to test in yessql's repository directly and fix there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Assume I have a query like this:
var query = _session.Query<ContentItem, ContentItemIndex>().Where(c => c.ContentType == "Country");
I want to get the results of this query:
var countries1 = await query.ListAsync();
Next I need to extend the same query:
query = query.With<ContentItemIndex>().Where(c => c.Published);
But when I try to get the results of the extended query, the results are wrong:
var countries2 = await query.ListAsync();
When I remove the line to get
countries1
(so remove ListAsync()) ,countries2
is correct.So after calling ListAsync on a query, everything that's done to extend the query is ignored. Is there a way to work around this problem? Perhaps clone a query before calling ListAsync()? What are my options?
Beta Was this translation helpful? Give feedback.
All reactions