mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: delete removal edges from mutation (#1654)
* Remove Edge IDs from internal Mutation state * Update template gen * Update integration tests * Update examples
This commit is contained in:
@@ -188,6 +188,7 @@ func (m *GroupMutation) RemoveUserIDs(ids ...int) {
|
||||
m.removedusers = make(map[int]struct{})
|
||||
}
|
||||
for i := range ids {
|
||||
delete(m.users, ids[i])
|
||||
m.removedusers[ids[i]] = struct{}{}
|
||||
}
|
||||
}
|
||||
@@ -625,6 +626,7 @@ func (m *UserMutation) RemoveGroupIDs(ids ...int) {
|
||||
m.removedgroups = make(map[int]struct{})
|
||||
}
|
||||
for i := range ids {
|
||||
delete(m.groups, ids[i])
|
||||
m.removedgroups[ids[i]] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user