You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting some funny query results in one of my projects. Specifically, I have the following query, which uses a "negated any" as a workaround since MartenDb doesn’t support "All". While the "negated any" works fine on its own or with certain clauses, MartenDb appears unable to correctly translate the Where clause in the example below:
publicIExecutable<Event>WebStyleSearchAndParticipantIncorrect([Service]IDocumentSessionsession,CancellationTokencancellationToken)=>session.Query<Event>().Where(pEvent =>pEvent.WebStyleSearch("Marketing OR Sustainability")&&!pEvent.Participants.Any(participant =>!participant.Name.StartsWith("D"))).AsExecutable();
I've created a minimal reproduction project that you can review here: https://github.com/Healios/martendb-incorrect-sql-generation. The README should appropriately explain how to run the project, seed the database, and test the different scenarios.
The text was updated successfully, but these errors were encountered:
Hey, a pull request with a failing test would have been a much better way to send us the reproduction steps if you ever need to do this again. Happy with a good repro regardless, but the first thing I'll do is adapt your repository as a test inside the Marten codebase itself.
Marten does support the LINQ All() in some cases. I know because that was a massive PITA to support.
Hello
I'm getting some funny query results in one of my projects. Specifically, I have the following query, which uses a "negated any" as a workaround since MartenDb doesn’t support "All". While the "negated any" works fine on its own or with certain clauses, MartenDb appears unable to correctly translate the Where clause in the example below:
I've created a minimal reproduction project that you can review here: https://github.com/Healios/martendb-incorrect-sql-generation. The README should appropriately explain how to run the project, seed the database, and test the different scenarios.
The text was updated successfully, but these errors were encountered: