Skip to content

Cosmos: Projecting out owned entities retrieves the entire document #34067

@roji

Description

@roji
public virtual Task Project_owned_reference_navigation_which_owns_additional(bool async)
    => AssertQuery(
        async,
        ss => ss.Set<OwnedPerson>().OrderBy(o => o.Id).Select(p => p.PersonAddress));

Since PersonAddress owns further entity types (OwnedCountry), the expression inside the Select() contains IncludeExpression; this leads CosmosProjectionBindingExpressionVisitor into a specific path where we end up projecting the entire document. Compare how this works in relational - CosmosProjectionBindingExpressionVisitor is one place where Cosmos is still quite behind.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions