Query: Subquery projection being selected incorrectly with required navigation filter #6657
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
Full example
EfCoreJoinIssue.zip
The issue
Running
Generates a query that joins using the wrong columns(or alias).
If we move Take(5) to the end, or remove the Where. It works:
IQueryable posts = db.Posts;
posts = posts.Where(x => x.Author.UserName == "myuser");
var query = (from post in posts
select new { post.Slug, C = post.Comments.Count() }).Take(5);
Or:
IQueryable posts = db.Posts;
posts = posts.Take(5);
The text was updated successfully, but these errors were encountered: