HasQueryFilter generates incorrect sql, causing "multi-part identifier could not be bound" #10283
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
I have two classes, Plant and UserPlant. UserPlant is a lookup table that ties Users from another data source to Plant (so I'm not mapping User). Both inherit from a base class that provides some properties common to my data objects.
My mappings look like this:
When I run
I get
This is the generated sql:
The 2nd query seems to be the problem, referencing an alias 't' that doesn't exist. However, if I remove the HasQueryFilter mapping, it works. What am I doing wrong?
Further technical details
EF Core version: 2.0.0
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 7
IDE: Visual Studio 2017
The text was updated successfully, but these errors were encountered: