mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
entc/gen/template: clone modifiers if enabled (#4189)
Fixed https://github.com/ent/ent/issues/4026
This commit is contained in:
@@ -295,6 +295,9 @@ func ({{ $receiver }} *{{ $builder }}) Clone() *{{ $builder }} {
|
||||
// clone intermediate query.
|
||||
{{ $.Storage }}: {{ $receiver }}.{{ $.Storage }}.Clone(),
|
||||
path: {{ $receiver }}.path,
|
||||
{{- if $.FeatureEnabled "sql/modifier" }}
|
||||
modifiers: append([]func(*sql.Selector){}, {{ $receiver }}.modifiers...),
|
||||
{{- end }}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user