-
Notifications
You must be signed in to change notification settings - Fork 3.3k
"The value of shadow key property 'PROPERTYNAME' is unknown when attempting to save changes" on tracked entities #26330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@AndriySvyryd Verified this is a regression from 5.0, and still repros on latest daily. |
@AndriySvyryd FYI, started working on this; will continue tomorrow. |
@ajcvickers I'm seeing this currently in EFCore 6.0.2 with Sqlite. Can you confirm it should still be resolved? var modelToDelete = new ShadowTenantIdModel { Title = "TestTitle", Username = "TestUsername");
newTenant1Context.ShadowTenantIdModels.Remove(modelToDelete);
newTenant1Context.SaveChanges(); // Error about TenantId not being known, although it is set via a nontemp generator Thanks |
@AndrewTriesToCode Please open a new issue and attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate. |
Hello!
We are detecting a regression on our tests when using collections of Owned Types with a shadow key property.
It seems the owned entity is detected as with "unknown key" even if it is still tracked on the context (this is not happening with EF Core 3.1.x)
Tested with InMemory provider.
Full Program.cs:
Stack trace
Provider and version information
EF Core version: 6.0.0-rc.2.21480.5
Database providers: Microsoft.EntityFrameworkCore.InMemory
Target framework: .NET 6.0
Operating system: Windows 10.0.19042.1288
IDE: JetBrains Rider 2021.2.1
The text was updated successfully, but these errors were encountered: