No server-side handling of Contains (LIKE) on optional relationships #6473
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Steps to reproduce
Complete repro project (uses mssqllocaldb):
https://github.com/RedRiverSoftware/ef-repros/tree/no-server-like-on-optional-relationship
(git clone, dotnet restore, ef database update, dotnet run)
By default
RelationalEventId.QueryClientEvaluationWarning
is set to throw. Remove line 13 ofDemoContext.cs
and it will instead log the details to the console.The issue
I have a main entity and an optional child entity. When I try to filter with
string.Contains
on a property of the child entity (from the main entity), EF advises that it cannot process the query on the server.Expected behaviour - something along the lines of using an INNER JOIN and LIKE when it's a single criterion, or an OUTER JOIN with LIKE or IS NULL test if there are further alternative filter criteria (i.e. ORed together).
Further technical details
EF Core version: 1.0.0
Operating system: Windows 10
Visual Studio version: n/a commandline
The text was updated successfully, but these errors were encountered: