dotnet / dotnet/efcore

Allow projecting owned entities from tracking queries (without tracking them)

Open
#36,297 0 comments 3 reactions 0 assignees View on GitHub
area-query
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

When an owned entity is projected without its owner from a tracking query, we current throw a non-suppressible error. We should instead generate a warning-as-error by default, allowing users to suppress it.

The is especially troublesome for Cosmos, where this makes it impossible to project a document fragment without explicitly stating AsNoTracking.

Note: do this for relational and Cosmos. Once this is done, the relationship projection tests can be considerably simplified - we can just suppress the warning and remove all the special handling.

/cc @AndriySvyryd

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.