Table alias collision in generated SQL with subquery (MSSQL) #3826
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Windows 10, VS 2015, IIS Express, SQL Server Express 2014, EF 7.0.0-rc1-final, ASP.NET 6.0.0-rc1-final
I am seeing incorrect SQL generated with subqueries when the tables involved begin with the same letter.
Models:
FK setup:
Query:
Generated SQL:
With test data of 2 blogs, 2 posts for blog 1 and 0 for blog 2, this query incorrectly returns 0 results (should return one result, namely blog 2). If
BlogPost
in the subquery is aliased to something other than [b] it works fine, e.g.:The text was updated successfully, but these errors were encountered: