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
I'm testing GraphDiff to circumvent the lack of support for detached graph updates in Entity Framework.
I have 3 tables : Users, Groups and UsersGroups which is a simple join table with two columns (UserId, GroupId). These two columns are the composite key. This way, users can belong to zero or more groups.
I have a Group1 entity with 3 users (UserA, UserB and UserC). If I serialize this object in JSON and try to UpdateGraph it back with only two users left (say UserA and UserB), then The UsersGroups join row <UserC, Group1> is deleted from the Database (which is fine).... But UserC is deleted as well (which is something I don't want here. I'd like to remove him from Group1 but keep him safe).
Is there any configuration trick that could handle this scenario ? Maybe something to change in the DB schema ?
Further technical details
EF version: v6.2.0
GraphDiff version: v3.1.0
Database Provider: System.Data.SqlClient
Thanks for your attention !
The text was updated successfully, but these errors were encountered:
Do you think you could provide a project sample with the problem you would like we solve?
It will help my developer investigate the issue more efficiently.
We now always ask for a project sample even if the issue is easy to reproduce. As a free product, we must find some way to save time to offer an overall better experience for everyone and release fixes faster.
You can send it to: [email protected] if you need to keep the source private
My developer looked at it and you are right. We currently do not support the many to many scenario in which you only want the relationship to be deleted.
The major issue is the entity is currently removed in the DbSet and not from the collection itself.
Unfortunately, I believe the development time for this request is a little bit too high to make it works property ;(
Hello,
Maybe someone can help me with this one...
Description
I'm testing GraphDiff to circumvent the lack of support for detached graph updates in Entity Framework.
I have 3 tables : Users, Groups and UsersGroups which is a simple join table with two columns (UserId, GroupId). These two columns are the composite key. This way, users can belong to zero or more groups.
I have a Group1 entity with 3 users (UserA, UserB and UserC). If I serialize this object in JSON and try to UpdateGraph it back with only two users left (say UserA and UserB), then The UsersGroups join row <UserC, Group1> is deleted from the Database (which is fine).... But UserC is deleted as well (which is something I don't want here. I'd like to remove him from Group1 but keep him safe).
Is there any configuration trick that could handle this scenario ? Maybe something to change in the DB schema ?
Further technical details
Thanks for your attention !
The text was updated successfully, but these errors were encountered: