mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: move sql-update-one to sqlgraph
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user