-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Change detection for null navigations being set to null #14086
Milestone
Comments
@pikausp There are a couple of reasons why this is the case:
|
ajcvickers
changed the title
Setting lazy loaded properties to null
Change detection for null navigations being set to null
Jan 7, 2020
Reopening this based on discussion here: #19437 (comment). This should be fixed so it works consistently with both change tracking proxies and manually implemented notification entities. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I enabled lazy loading in my project. Say I have the following model
When I set Address property to null, the context does not consider that a change. If I access the property (call its getter) before setting it to null, the entity is marked as modified and the foreign key is set to null in the database.
Further technical details
EF Core version: 2.1.4
Database Provider: Pomelo.EntityFrameworkCore.MySql v2.1.2
Operating system: Windows 10 v1803
IDE: Visual Studio 2017 15.9
The text was updated successfully, but these errors were encountered: