mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: add support for summing custom Go numeric types
This commit is contained in:
committed by
Ariel Mashraki
parent
ee4fa653fd
commit
c40ae45aee
@@ -61,7 +61,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlSave(ctx context.Context) ({{ $ret }}
|
||||
Column: {{ $.Package }}.{{ $f.Constant }},
|
||||
})
|
||||
}
|
||||
{{- if and $f.Type.Numeric $f.ConvertedToBasic }}
|
||||
{{- if $f.SupportsMutationAdd }}
|
||||
if value, ok := {{ $mutation }}.Added{{ $f.StructField }}(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.{{ $f.Type.ConstName }},
|
||||
|
||||
Reference in New Issue
Block a user