efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Query: ExecuteDelete on entity type owning other entities do not work

Open smitpatel opened this issue 3 years ago • 3 comments

smitpatel avatar Aug 02 '22 20:08 smitpatel

Seems like either #28521 or #28520, no?

roji avatar Aug 02 '22 21:08 roji

This stems from a different code path. Suppose your owned entities are mapped to a different table then delete should be fine. But currently it would fail because we check for entity shaper in projection but for owned (or non-owned scenario in AutoInclude), we will get IncludeExpression and fail with non-entity projection. But those projections are added by us and user cannot control for owned entity.

smitpatel avatar Aug 02 '22 23:08 smitpatel

Makes sense, thanks!

roji avatar Aug 03 '22 08:08 roji

Fixed in #29023

smitpatel avatar Sep 09 '22 22:09 smitpatel