entc/gen: update mutation-id on post mutation

This commit is contained in:
Ariel Mashraki
2021-05-31 20:18:55 +03:00
committed by Ariel Mashraki
parent ca7aa4b742
commit 11567a3926
131 changed files with 408 additions and 202 deletions

View File

@@ -101,6 +101,7 @@ func (nc *NodeCreate) Save(ctx context.Context) (*Node, error) {
}
nc.mutation = mutation
node, err = nc.sqlSave(ctx)
mutation.id = &node.ID
mutation.done = true
return node, err
})
@@ -237,6 +238,7 @@ func (ncb *NodeCreateBulk) Save(ctx context.Context) ([]*Node, error) {
}
}
}
mutation.id = &nodes[i].ID
mutation.done = true
if err != nil {
return nil, err