mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: copies interceptors on Clone (#3194)
This commit is contained in:
@@ -256,6 +256,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...),
|
||||
// clone intermediate query.
|
||||
sql: gq.sql.Clone(),
|
||||
|
||||
@@ -281,6 +281,7 @@ func (pq *PetQuery) Clone() *PetQuery {
|
||||
limit: pq.limit,
|
||||
offset: pq.offset,
|
||||
order: append([]OrderFunc{}, pq.order...),
|
||||
inters: append([]Interceptor{}, pq.inters...),
|
||||
predicates: append([]predicate.Pet{}, pq.predicates...),
|
||||
withOwner: pq.withOwner.Clone(),
|
||||
// clone intermediate query.
|
||||
|
||||
@@ -304,6 +304,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...),
|
||||
withPets: uq.withPets.Clone(),
|
||||
withFriends: uq.withFriends.Clone(),
|
||||
|
||||
Reference in New Issue
Block a user