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:
Ivan Vanderbyl
2021-06-24 18:26:22 +10:00
committed by GitHub
parent a29784eb69
commit 4ba56ea901
24 changed files with 87 additions and 2 deletions

View File

@@ -300,6 +300,7 @@ func (m *FileMutation) RemoveChildIDs(ids ...int) {
m.removedchildren = make(map[int]struct{})
}
for i := range ids {
delete(m.children, ids[i])
m.removedchildren[ids[i]] = struct{}{}
}
}