entc/gen: copies interceptors on Clone (#3194)

This commit is contained in:
Pedro Henrique
2022-12-28 01:29:48 -03:00
committed by GitHub
parent c868f4a174
commit 8307c2eaba
136 changed files with 161 additions and 0 deletions

View File

@@ -278,6 +278,7 @@ func (cq *CarQuery) Clone() *CarQuery {
limit: cq.limit,
offset: cq.offset,
order: append([]OrderFunc{}, cq.order...),
inters: append([]Interceptor{}, cq.inters...),
predicates: append([]predicate.Car{}, cq.predicates...),
withOwner: cq.withOwner.Clone(),
// clone intermediate query.

View File

@@ -278,6 +278,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...),
withUsers: gq.withUsers.Clone(),
// clone intermediate query.

View File

@@ -302,6 +302,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...),
withCars: uq.withCars.Clone(),
withGroups: uq.withGroups.Clone(),