Summary
NorthwindNavigationsQueryMongoTest.Select_Where_Navigation_Null_Deep fails, and it is not the EF-369 defect — it never reaches the flat-lookup path at all. Split out of EF-216, where it was bundled with four cases that have a different root cause.
The shape is a two-hop navigation through a self-referencing relationship (Employee.Manager.Manager, in the Northwind fixture).
Two identified causes
Both found while prototyping the EF-370 unwind-semantics change; the four sibling EF-216 cases are fixed by that change, and this one is not.
- _innerCollections is keyed by IEntityType. A self-referencing two-hop navigation targets the same entity type at both hops, so the two joins collapse into a single registered inner collection. Downstream logic that counts joins to decide whether it is dealing with a multi-join query therefore sees one.
- RewriteJoinNode's outerType == oldOuterType guard. On the chained driver-native path this makes the second hop fall through to Queryable.Join, so it emits a bare (inner) $unwind even though the navigation is optional — dropping rows where the correct answer keeps them with a null navigation.
A refuted hypothesis, recorded so it is not retried
An initial diagnosis of an alias collision between the two hops (both resolving to the same lookup<Nav> name because the target entity type is identical) was measured and refuted. The query does not reach the code path where that alias is constructed.
Relationship to the other tickets
- EF-216 — four of its five skipped cases are fixed by
EF-370; this is the residual. See the comment there. EF-370— required-navigation unwind semantics. Fixes the siblings, not this.EF-369— composed operators discarded for a multi-join Include. Not this defect; this shape never reaches that code.
The Skip on this test should stay, retargeted from EF-216 to this ticket once EF-370 lands and the other four are un-skipped.
Scope
Unreleased. The affected code arrived with efb5f25 (PR #309), which is not an ancestor of v10.0.2, so no released version is affected and this is not a breaking change.