entc/gen: allow selecting specific fields (#1075)

This commit is contained in:
Ariel Mashraki
2020-12-23 17:35:39 +02:00
committed by GitHub
parent 0902673b40
commit da34571560
204 changed files with 3453 additions and 2891 deletions

View File

@@ -238,7 +238,7 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error)
}
_node = &User{config: uuo.config}
_spec.Assign = _node.assignValues
_spec.ScanValues = _node.scanValues()
_spec.ScanValues = _node.scanValues
if err = sqlgraph.UpdateNode(ctx, uuo.driver, _spec); err != nil {
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{user.Label}