dotnet / dotnet/efcore

Query: when navigating from dependent to principal to another dependent we can skip the principal table and just compare FKs on the dependent tables in some cases

Open
#31,989 0 comments 0 reactions 0 assignees View on GitHub
area-query customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

pointed out by @DJDoena in https://github.com/dotnet/efcore/issues/31350

When we have 1-1 navigation from dependent to principal and then from that principal to another dependent we currently generate 2 joins (D1 INNER JOIN P ON D1.FK = P.PK LEFT JOIN D2 ON P.PK = D2.FK), but instead we could do D1 LEFT JOIN D2 ON D1.FK = D2.FK.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.