Comments (4)
Note for team: still repros on latest daily; not a regression.
from entityframework.docs.
Note: also repros for non-json owned entities
from entityframework.docs.
The example only works if MoreData
was something (not null) at the time it was attached.
from entityframework.docs.
Note for triage: I investigated this more. If this was not an owned type, this would be the correct behavior. This is because, in effect, the MoreData
navigation isn't loaded. What this should do for owned types depends on whether or not we allow optional owned types to be not loaded. From an aggregate perspective, not allowed them to be unloaded is fine. That is, we could assume that if the navigation is null, then the owned type does not exist in the database, as opposed to it just isn't loaded. From the perspective of how people actually use owned types, it may not be fine.
Given that we are unsure where owned types are going, I propose we do nothing here immediately.
It's also worth noting that this works:
myDbContext.Update(owner);
owner.Data.MoreData = null;
myDbContext.SaveChanges();
This is because in this case EF is tracking the entity when the nav is set to null, so EF correctly detects this as a delete.
from entityframework.docs.
Related Issues (20)
- Problem with instslling Entity Framework SQL Server HOT 2
- StringToNumberConverter HOT 1
- Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[mywebsite.Data.ApplicationDbContext]' while attempting to activate 'mywebsite.Data.ApplicationDbContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728 HOT 6
- Add back setter for scaffolded collection navigations HOT 4
- Typo in link redirects to wrong site HOT 3
- s
- VS Community 2022 cannot install dotnet-ef when i try to publish. HOT 1
- Document ListValueComparer breaking change
- Document MsBuild integration
- Documentation improvement about data-seeding
- Concerning DbContext disposal HOT 1
- missing defaults information HOT 1
- I cant make use of the Entity.FrameworkCore HOT 1
- Missing doc about Primitive Collections HOT 1
- Doc does not address the most common use-case, when DbContext is injected
- Entity Framework Core 9 HOT 2
- AddRange & Internal Snapshot Method Missing Info
- Primitive Collection Must Implement IList
- Please provide some code samples how to use it in reality. HOT 1
- include
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entityframework.docs.