mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: add struct field name to fields and edges
Summary: avoig logic in templates Reviewed By: alexsn Differential Revision: D17926168 fbshipit-source-id: d583e800fb4a45cf939e9788cea6d45e126c61fe
This commit is contained in:
committed by
Facebook Github Bot
parent
64ed7580c0
commit
36a3971f3d
@@ -31,7 +31,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) (*{{ $.Name
|
||||
{{- else }}
|
||||
builder.Set({{ $.Package }}.{{ $f.Constant }}, *value)
|
||||
{{- end }}
|
||||
{{ $.Receiver }}.{{ pascal $f.Name }} = {{ if not $f.Nillable }}*{{ end }}value
|
||||
{{ $.Receiver }}.{{ $f.StructField }} = {{ if not $f.Nillable }}*{{ end }}value
|
||||
}
|
||||
{{- end }}
|
||||
query, args := builder.Query()
|
||||
|
||||
Reference in New Issue
Block a user