mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: remove legacy i2a support for ids (#389)
* entc/gen: remove legacy i2a support for ids * integ: add customid tests for fk strings
This commit is contained in:
@@ -57,8 +57,8 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) (*{{ $.Name
|
||||
if {{ $.Receiver }}.ID == 0 {
|
||||
{{- end }}
|
||||
id := _spec.ID.Value.(int64)
|
||||
{{ $.Receiver }}.ID = {{ if $.ID.IsString }}strconv.FormatInt(id, 10){{ else }}{{ $.ID.Type }}(id){{ end }}
|
||||
{{- if and $.ID.UserDefined }}
|
||||
{{ $.Receiver }}.ID = {{ $.ID.Type }}(id)
|
||||
{{- if $.ID.UserDefined }}
|
||||
}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user