mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/gen: copies interceptors on Clone (#3194)
This commit is contained in:
@@ -303,6 +303,7 @@ func (gq *GroupQuery) Clone() *GroupQuery {
|
||||
limit: gq.limit,
|
||||
offset: gq.offset,
|
||||
order: append([]OrderFunc{}, gq.order...),
|
||||
inters: append([]Interceptor{}, gq.inters...),
|
||||
predicates: append([]predicate.Group{}, gq.predicates...),
|
||||
withTenant: gq.withTenant.Clone(),
|
||||
withUsers: gq.withUsers.Clone(),
|
||||
|
||||
@@ -254,6 +254,7 @@ func (tq *TenantQuery) Clone() *TenantQuery {
|
||||
limit: tq.limit,
|
||||
offset: tq.offset,
|
||||
order: append([]OrderFunc{}, tq.order...),
|
||||
inters: append([]Interceptor{}, tq.inters...),
|
||||
predicates: append([]predicate.Tenant{}, tq.predicates...),
|
||||
// clone intermediate query.
|
||||
sql: tq.sql.Clone(),
|
||||
|
||||
@@ -303,6 +303,7 @@ func (uq *UserQuery) Clone() *UserQuery {
|
||||
limit: uq.limit,
|
||||
offset: uq.offset,
|
||||
order: append([]OrderFunc{}, uq.order...),
|
||||
inters: append([]Interceptor{}, uq.inters...),
|
||||
predicates: append([]predicate.User{}, uq.predicates...),
|
||||
withTenant: uq.withTenant.Clone(),
|
||||
withGroups: uq.withGroups.Clone(),
|
||||
|
||||
Reference in New Issue
Block a user