entc/gen: move sql-update-one to sqlgraph

This commit is contained in:
Ariel Mashraki
2019-12-18 19:25:46 +02:00
parent 1bbe460259
commit 7fde9b7642
53 changed files with 8834 additions and 7859 deletions

View File

@@ -73,7 +73,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) (*{{ $.Name
{{- if and $.ID.UserDefined (or $.ID.IsString $.ID.IsUUID) }}
{{- /* Do nothing, because these 2 types must be supplied by the user. */ -}}
{{- else }}
{{- if and $.ID.UserDefined }}
{{- if $.ID.UserDefined }}
if {{ $.Receiver }}.ID == 0 {
{{- end }}
id := spec.ID.Value.(int64)