Shadow key property unknown when updating JSON document with a list and NoTracking behavior enabled #34616
Labels
area-change-tracking
closed-no-further-action
The issue is closed and no further action is planned.
customer-reported
Issue
We enabled the
NoTracking
query behavior on a Entity Framework DB Context.Our setup heavily relies on entity tracking being disabled:
We then add successfully a new row containing a column with a JSON document with a list of a complex type:
Using the
ToJson
model builder:We then query the previously added document, and, after updating it, we are unable to save the changes in the database because of an unknown shadow key property in the list of complex objects.
We have tried to set the state of the object and of the elements in the list to
Modified
but found no difference:Code
I created a simple project to replicate the issue:
https://github.com/Sticcia/EFCore8Test
Stack Trace
Provider and version information
EF Core version: 8.0.6
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
Operating system: Windows 11
IDE: Visual Studio 2022 17.11.0
The text was updated successfully, but these errors were encountered: