You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With filtered includes, there can now be some tricky situations where users load a filtered subset of dependents, and then attempt to add a new entity which already exists in the database. Since EF isn't aware of that entity, an INSERT will be generated and will fail. With regular include, this doesn't happen because EF knows about all the dependents from change tracking, so a different exception is raised etc. It may be worth adding a bit of guidance on this.
@smitpatel also informed me that with filtered include we consider the relationship to be loaded, e.g. for lazy-loading purposes. This should probably also be mentioned.
With filtered includes, there can now be some tricky situations where users load a filtered subset of dependents, and then attempt to add a new entity which already exists in the database. Since EF isn't aware of that entity, an INSERT will be generated and will fail. With regular include, this doesn't happen because EF knows about all the dependents from change tracking, so a different exception is raised etc. It may be worth adding a bit of guidance on this.
@smitpatel also informed me that with filtered include we consider the relationship to be loaded, e.g. for lazy-loading purposes. This should probably also be mentioned.
/cc @maumar @ajcvickers
The text was updated successfully, but these errors were encountered: