From 8307c2eaba18f614a7a71bdb55fbc33c51f99265 Mon Sep 17 00:00:00 2001 From: Pedro Henrique Date: Wed, 28 Dec 2022 01:29:48 -0300 Subject: [PATCH] entc/gen: copies interceptors on Clone (#3194) --- entc/gen/template/builder/query.tmpl | 1 + .../cascadelete/ent/comment_query.go | 1 + .../integration/cascadelete/ent/post_query.go | 1 + .../integration/cascadelete/ent/user_query.go | 1 + entc/integration/config/ent/user_query.go | 1 + .../integration/customid/ent/account_query.go | 1 + entc/integration/customid/ent/blob_query.go | 1 + .../customid/ent/bloblink_query.go | 1 + entc/integration/customid/ent/car_query.go | 1 + entc/integration/customid/ent/device_query.go | 1 + entc/integration/customid/ent/doc_query.go | 1 + entc/integration/customid/ent/group_query.go | 1 + entc/integration/customid/ent/intsid_query.go | 1 + entc/integration/customid/ent/link_query.go | 1 + .../integration/customid/ent/mixinid_query.go | 1 + entc/integration/customid/ent/note_query.go | 1 + entc/integration/customid/ent/other_query.go | 1 + entc/integration/customid/ent/pet_query.go | 1 + .../customid/ent/revision_query.go | 1 + .../integration/customid/ent/session_query.go | 1 + entc/integration/customid/ent/token_query.go | 1 + entc/integration/customid/ent/user_query.go | 1 + entc/integration/edgefield/ent/car_query.go | 1 + entc/integration/edgefield/ent/card_query.go | 1 + entc/integration/edgefield/ent/info_query.go | 1 + .../edgefield/ent/metadata_query.go | 1 + entc/integration/edgefield/ent/node_query.go | 1 + entc/integration/edgefield/ent/pet_query.go | 1 + entc/integration/edgefield/ent/post_query.go | 1 + .../integration/edgefield/ent/rental_query.go | 1 + entc/integration/edgefield/ent/user_query.go | 1 + .../edgeschema/ent/friendship_query.go | 1 + .../integration/edgeschema/ent/group_query.go | 1 + .../edgeschema/ent/grouptag_query.go | 1 + .../edgeschema/ent/relationship_query.go | 1 + .../edgeschema/ent/relationshipinfo_query.go | 1 + entc/integration/edgeschema/ent/role_query.go | 1 + .../edgeschema/ent/roleuser_query.go | 1 + entc/integration/edgeschema/ent/tag_query.go | 1 + .../integration/edgeschema/ent/tweet_query.go | 1 + .../edgeschema/ent/tweetlike_query.go | 1 + .../edgeschema/ent/tweettag_query.go | 1 + entc/integration/edgeschema/ent/user_query.go | 1 + .../edgeschema/ent/usergroup_query.go | 1 + .../edgeschema/ent/usertweet_query.go | 1 + entc/integration/ent/card_query.go | 1 + entc/integration/ent/comment_query.go | 1 + entc/integration/ent/fieldtype_query.go | 1 + entc/integration/ent/file_query.go | 1 + entc/integration/ent/filetype_query.go | 1 + entc/integration/ent/goods_query.go | 1 + entc/integration/ent/group_query.go | 1 + entc/integration/ent/groupinfo_query.go | 1 + entc/integration/ent/item_query.go | 1 + entc/integration/ent/license_query.go | 1 + entc/integration/ent/node_query.go | 1 + entc/integration/ent/pet_query.go | 1 + entc/integration/ent/spec_query.go | 1 + entc/integration/ent/task_query.go | 1 + entc/integration/ent/user_query.go | 1 + entc/integration/gremlin/ent/card_query.go | 1 + entc/integration/gremlin/ent/comment_query.go | 1 + .../gremlin/ent/fieldtype_query.go | 1 + entc/integration/gremlin/ent/file_query.go | 1 + .../integration/gremlin/ent/filetype_query.go | 1 + entc/integration/gremlin/ent/goods_query.go | 1 + entc/integration/gremlin/ent/group_query.go | 1 + .../gremlin/ent/groupinfo_query.go | 1 + entc/integration/gremlin/ent/item_query.go | 1 + entc/integration/gremlin/ent/license_query.go | 1 + entc/integration/gremlin/ent/node_query.go | 1 + entc/integration/gremlin/ent/pet_query.go | 1 + entc/integration/gremlin/ent/spec_query.go | 1 + entc/integration/gremlin/ent/task_query.go | 1 + entc/integration/gremlin/ent/user_query.go | 1 + entc/integration/hooks/ent/card_query.go | 1 + entc/integration/hooks/ent/pet_query.go | 1 + entc/integration/hooks/ent/user_query.go | 1 + entc/integration/hooks/hooks_test.go | 26 +++++++++++++++++++ entc/integration/idtype/ent/user_query.go | 1 + entc/integration/json/ent/user_query.go | 1 + entc/integration/migrate/entv1/car_query.go | 1 + .../migrate/entv1/conversion_query.go | 1 + .../migrate/entv1/customtype_query.go | 1 + entc/integration/migrate/entv1/user_query.go | 1 + entc/integration/migrate/entv2/blog_query.go | 1 + entc/integration/migrate/entv2/car_query.go | 1 + .../migrate/entv2/conversion_query.go | 1 + .../migrate/entv2/customtype_query.go | 1 + entc/integration/migrate/entv2/group_query.go | 1 + entc/integration/migrate/entv2/media_query.go | 1 + entc/integration/migrate/entv2/pet_query.go | 1 + entc/integration/migrate/entv2/user_query.go | 1 + entc/integration/migrate/entv2/zoo_query.go | 1 + .../migrate/versioned/group_query.go | 1 + .../migrate/versioned/user_query.go | 1 + .../multischema/ent/friendship_query.go | 1 + .../multischema/ent/group_query.go | 1 + entc/integration/multischema/ent/pet_query.go | 1 + .../integration/multischema/ent/user_query.go | 1 + entc/integration/privacy/ent/task_query.go | 1 + entc/integration/privacy/ent/team_query.go | 1 + entc/integration/privacy/ent/user_query.go | 1 + entc/integration/template/ent/group_query.go | 1 + entc/integration/template/ent/pet_query.go | 1 + entc/integration/template/ent/user_query.go | 1 + examples/edgeindex/ent/city_query.go | 1 + examples/edgeindex/ent/street_query.go | 1 + examples/entcpkg/ent/user_query.go | 1 + examples/fs/ent/file_query.go | 1 + examples/jsonencode/ent/card_query.go | 1 + examples/jsonencode/ent/pet_query.go | 1 + examples/jsonencode/ent/user_query.go | 1 + examples/m2m2types/ent/group_query.go | 1 + examples/m2m2types/ent/user_query.go | 1 + examples/m2mbidi/ent/user_query.go | 1 + examples/m2mrecur/ent/user_query.go | 1 + examples/migration/ent/user_query.go | 1 + examples/o2m2types/ent/pet_query.go | 1 + examples/o2m2types/ent/user_query.go | 1 + examples/o2mrecur/ent/node_query.go | 1 + examples/o2o2types/ent/card_query.go | 1 + examples/o2o2types/ent/user_query.go | 1 + examples/o2obidi/ent/user_query.go | 1 + examples/o2orecur/ent/node_query.go | 1 + examples/privacyadmin/ent/user_query.go | 1 + examples/privacytenant/ent/group_query.go | 1 + examples/privacytenant/ent/tenant_query.go | 1 + examples/privacytenant/ent/user_query.go | 1 + examples/start/ent/car_query.go | 1 + examples/start/ent/group_query.go | 1 + examples/start/ent/user_query.go | 1 + examples/traversal/ent/group_query.go | 1 + examples/traversal/ent/pet_query.go | 1 + examples/traversal/ent/user_query.go | 1 + examples/version/ent/user_query.go | 1 + 136 files changed, 161 insertions(+) diff --git a/entc/gen/template/builder/query.tmpl b/entc/gen/template/builder/query.tmpl index 90c0b05d9..06bdcf8fa 100644 --- a/entc/gen/template/builder/query.tmpl +++ b/entc/gen/template/builder/query.tmpl @@ -292,6 +292,7 @@ func ({{ $receiver }} *{{ $builder }}) Clone() *{{ $builder }} { limit: {{ $receiver }}.limit, offset: {{ $receiver }}.offset, order: append([]OrderFunc{}, {{ $receiver }}.order...), + inters: append([]Interceptor{}, {{ $receiver }}.inters...), predicates: append([]predicate.{{ $.Name }}{}, {{ $receiver }}.predicates...), {{- range $e := $.Edges }} {{ $e.EagerLoadField }}: {{ $receiver }}.{{ $e.EagerLoadField }}.Clone(), diff --git a/entc/integration/cascadelete/ent/comment_query.go b/entc/integration/cascadelete/ent/comment_query.go index 92bf29b55..2707d4a06 100644 --- a/entc/integration/cascadelete/ent/comment_query.go +++ b/entc/integration/cascadelete/ent/comment_query.go @@ -277,6 +277,7 @@ func (cq *CommentQuery) Clone() *CommentQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Comment{}, cq.predicates...), withPost: cq.withPost.Clone(), // clone intermediate query. diff --git a/entc/integration/cascadelete/ent/post_query.go b/entc/integration/cascadelete/ent/post_query.go index 6427b2a6c..e5a4c32bb 100644 --- a/entc/integration/cascadelete/ent/post_query.go +++ b/entc/integration/cascadelete/ent/post_query.go @@ -302,6 +302,7 @@ func (pq *PostQuery) Clone() *PostQuery { limit: pq.limit, offset: pq.offset, order: append([]OrderFunc{}, pq.order...), + inters: append([]Interceptor{}, pq.inters...), predicates: append([]predicate.Post{}, pq.predicates...), withAuthor: pq.withAuthor.Clone(), withComments: pq.withComments.Clone(), diff --git a/entc/integration/cascadelete/ent/user_query.go b/entc/integration/cascadelete/ent/user_query.go index 8a85d5df9..c4b047d67 100644 --- a/entc/integration/cascadelete/ent/user_query.go +++ b/entc/integration/cascadelete/ent/user_query.go @@ -278,6 +278,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...), withPosts: uq.withPosts.Clone(), // clone intermediate query. diff --git a/entc/integration/config/ent/user_query.go b/entc/integration/config/ent/user_query.go index 84e6556be..f7867f841 100644 --- a/entc/integration/config/ent/user_query.go +++ b/entc/integration/config/ent/user_query.go @@ -253,6 +253,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...), // clone intermediate query. sql: uq.sql.Clone(), diff --git a/entc/integration/customid/ent/account_query.go b/entc/integration/customid/ent/account_query.go index bfa06a268..76ae2d304 100644 --- a/entc/integration/customid/ent/account_query.go +++ b/entc/integration/customid/ent/account_query.go @@ -279,6 +279,7 @@ func (aq *AccountQuery) Clone() *AccountQuery { limit: aq.limit, offset: aq.offset, order: append([]OrderFunc{}, aq.order...), + inters: append([]Interceptor{}, aq.inters...), predicates: append([]predicate.Account{}, aq.predicates...), withToken: aq.withToken.Clone(), // clone intermediate query. diff --git a/entc/integration/customid/ent/blob_query.go b/entc/integration/customid/ent/blob_query.go index e0ea84ede..5681e93d3 100644 --- a/entc/integration/customid/ent/blob_query.go +++ b/entc/integration/customid/ent/blob_query.go @@ -326,6 +326,7 @@ func (bq *BlobQuery) Clone() *BlobQuery { limit: bq.limit, offset: bq.offset, order: append([]OrderFunc{}, bq.order...), + inters: append([]Interceptor{}, bq.inters...), predicates: append([]predicate.Blob{}, bq.predicates...), withParent: bq.withParent.Clone(), withLinks: bq.withLinks.Clone(), diff --git a/entc/integration/customid/ent/bloblink_query.go b/entc/integration/customid/ent/bloblink_query.go index e43846c32..d1aad7e92 100644 --- a/entc/integration/customid/ent/bloblink_query.go +++ b/entc/integration/customid/ent/bloblink_query.go @@ -230,6 +230,7 @@ func (blq *BlobLinkQuery) Clone() *BlobLinkQuery { limit: blq.limit, offset: blq.offset, order: append([]OrderFunc{}, blq.order...), + inters: append([]Interceptor{}, blq.inters...), predicates: append([]predicate.BlobLink{}, blq.predicates...), withBlob: blq.withBlob.Clone(), withLink: blq.withLink.Clone(), diff --git a/entc/integration/customid/ent/car_query.go b/entc/integration/customid/ent/car_query.go index f66ce8cef..506c9a62a 100644 --- a/entc/integration/customid/ent/car_query.go +++ b/entc/integration/customid/ent/car_query.go @@ -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. diff --git a/entc/integration/customid/ent/device_query.go b/entc/integration/customid/ent/device_query.go index d335b8e92..19b6366d8 100644 --- a/entc/integration/customid/ent/device_query.go +++ b/entc/integration/customid/ent/device_query.go @@ -303,6 +303,7 @@ func (dq *DeviceQuery) Clone() *DeviceQuery { limit: dq.limit, offset: dq.offset, order: append([]OrderFunc{}, dq.order...), + inters: append([]Interceptor{}, dq.inters...), predicates: append([]predicate.Device{}, dq.predicates...), withActiveSession: dq.withActiveSession.Clone(), withSessions: dq.withSessions.Clone(), diff --git a/entc/integration/customid/ent/doc_query.go b/entc/integration/customid/ent/doc_query.go index 87b5750c1..76f44b2d2 100644 --- a/entc/integration/customid/ent/doc_query.go +++ b/entc/integration/customid/ent/doc_query.go @@ -325,6 +325,7 @@ func (dq *DocQuery) Clone() *DocQuery { limit: dq.limit, offset: dq.offset, order: append([]OrderFunc{}, dq.order...), + inters: append([]Interceptor{}, dq.inters...), predicates: append([]predicate.Doc{}, dq.predicates...), withParent: dq.withParent.Clone(), withChildren: dq.withChildren.Clone(), diff --git a/entc/integration/customid/ent/group_query.go b/entc/integration/customid/ent/group_query.go index e7dd1b12d..346562d37 100644 --- a/entc/integration/customid/ent/group_query.go +++ b/entc/integration/customid/ent/group_query.go @@ -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. diff --git a/entc/integration/customid/ent/intsid_query.go b/entc/integration/customid/ent/intsid_query.go index 7db5f4a6f..aeee70d85 100644 --- a/entc/integration/customid/ent/intsid_query.go +++ b/entc/integration/customid/ent/intsid_query.go @@ -302,6 +302,7 @@ func (isq *IntSIDQuery) Clone() *IntSIDQuery { limit: isq.limit, offset: isq.offset, order: append([]OrderFunc{}, isq.order...), + inters: append([]Interceptor{}, isq.inters...), predicates: append([]predicate.IntSID{}, isq.predicates...), withParent: isq.withParent.Clone(), withChildren: isq.withChildren.Clone(), diff --git a/entc/integration/customid/ent/link_query.go b/entc/integration/customid/ent/link_query.go index b7191c785..2628de94a 100644 --- a/entc/integration/customid/ent/link_query.go +++ b/entc/integration/customid/ent/link_query.go @@ -254,6 +254,7 @@ func (lq *LinkQuery) Clone() *LinkQuery { limit: lq.limit, offset: lq.offset, order: append([]OrderFunc{}, lq.order...), + inters: append([]Interceptor{}, lq.inters...), predicates: append([]predicate.Link{}, lq.predicates...), // clone intermediate query. sql: lq.sql.Clone(), diff --git a/entc/integration/customid/ent/mixinid_query.go b/entc/integration/customid/ent/mixinid_query.go index f8de143f3..89c42eb64 100644 --- a/entc/integration/customid/ent/mixinid_query.go +++ b/entc/integration/customid/ent/mixinid_query.go @@ -254,6 +254,7 @@ func (miq *MixinIDQuery) Clone() *MixinIDQuery { limit: miq.limit, offset: miq.offset, order: append([]OrderFunc{}, miq.order...), + inters: append([]Interceptor{}, miq.inters...), predicates: append([]predicate.MixinID{}, miq.predicates...), // clone intermediate query. sql: miq.sql.Clone(), diff --git a/entc/integration/customid/ent/note_query.go b/entc/integration/customid/ent/note_query.go index e5fe7767f..66258278f 100644 --- a/entc/integration/customid/ent/note_query.go +++ b/entc/integration/customid/ent/note_query.go @@ -302,6 +302,7 @@ func (nq *NoteQuery) Clone() *NoteQuery { limit: nq.limit, offset: nq.offset, order: append([]OrderFunc{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Note{}, nq.predicates...), withParent: nq.withParent.Clone(), withChildren: nq.withChildren.Clone(), diff --git a/entc/integration/customid/ent/other_query.go b/entc/integration/customid/ent/other_query.go index ba52e3ca6..7f54292cf 100644 --- a/entc/integration/customid/ent/other_query.go +++ b/entc/integration/customid/ent/other_query.go @@ -254,6 +254,7 @@ func (oq *OtherQuery) Clone() *OtherQuery { limit: oq.limit, offset: oq.offset, order: append([]OrderFunc{}, oq.order...), + inters: append([]Interceptor{}, oq.inters...), predicates: append([]predicate.Other{}, oq.predicates...), // clone intermediate query. sql: oq.sql.Clone(), diff --git a/entc/integration/customid/ent/pet_query.go b/entc/integration/customid/ent/pet_query.go index 76802fd1d..14200581e 100644 --- a/entc/integration/customid/ent/pet_query.go +++ b/entc/integration/customid/ent/pet_query.go @@ -349,6 +349,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(), withCars: pq.withCars.Clone(), diff --git a/entc/integration/customid/ent/revision_query.go b/entc/integration/customid/ent/revision_query.go index 7ae1d09e6..c54b5c9e3 100644 --- a/entc/integration/customid/ent/revision_query.go +++ b/entc/integration/customid/ent/revision_query.go @@ -253,6 +253,7 @@ func (rq *RevisionQuery) Clone() *RevisionQuery { limit: rq.limit, offset: rq.offset, order: append([]OrderFunc{}, rq.order...), + inters: append([]Interceptor{}, rq.inters...), predicates: append([]predicate.Revision{}, rq.predicates...), // clone intermediate query. sql: rq.sql.Clone(), diff --git a/entc/integration/customid/ent/session_query.go b/entc/integration/customid/ent/session_query.go index 016d67eee..4f8581c12 100644 --- a/entc/integration/customid/ent/session_query.go +++ b/entc/integration/customid/ent/session_query.go @@ -279,6 +279,7 @@ func (sq *SessionQuery) Clone() *SessionQuery { limit: sq.limit, offset: sq.offset, order: append([]OrderFunc{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), predicates: append([]predicate.Session{}, sq.predicates...), withDevice: sq.withDevice.Clone(), // clone intermediate query. diff --git a/entc/integration/customid/ent/token_query.go b/entc/integration/customid/ent/token_query.go index 06f7d53a6..1cb8a2fa2 100644 --- a/entc/integration/customid/ent/token_query.go +++ b/entc/integration/customid/ent/token_query.go @@ -279,6 +279,7 @@ func (tq *TokenQuery) Clone() *TokenQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Token{}, tq.predicates...), withAccount: tq.withAccount.Clone(), // clone intermediate query. diff --git a/entc/integration/customid/ent/user_query.go b/entc/integration/customid/ent/user_query.go index 2fa8d777f..ce2be94fc 100644 --- a/entc/integration/customid/ent/user_query.go +++ b/entc/integration/customid/ent/user_query.go @@ -349,6 +349,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...), withGroups: uq.withGroups.Clone(), withParent: uq.withParent.Clone(), diff --git a/entc/integration/edgefield/ent/car_query.go b/entc/integration/edgefield/ent/car_query.go index e118c92c8..1067cb3cf 100644 --- a/entc/integration/edgefield/ent/car_query.go +++ b/entc/integration/edgefield/ent/car_query.go @@ -279,6 +279,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...), withRentals: cq.withRentals.Clone(), // clone intermediate query. diff --git a/entc/integration/edgefield/ent/card_query.go b/entc/integration/edgefield/ent/card_query.go index a39ad0d6d..f2aaf5ef1 100644 --- a/entc/integration/edgefield/ent/card_query.go +++ b/entc/integration/edgefield/ent/card_query.go @@ -277,6 +277,7 @@ func (cq *CardQuery) Clone() *CardQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Card{}, cq.predicates...), withOwner: cq.withOwner.Clone(), // clone intermediate query. diff --git a/entc/integration/edgefield/ent/info_query.go b/entc/integration/edgefield/ent/info_query.go index 8da1009ba..5825945fd 100644 --- a/entc/integration/edgefield/ent/info_query.go +++ b/entc/integration/edgefield/ent/info_query.go @@ -277,6 +277,7 @@ func (iq *InfoQuery) Clone() *InfoQuery { limit: iq.limit, offset: iq.offset, order: append([]OrderFunc{}, iq.order...), + inters: append([]Interceptor{}, iq.inters...), predicates: append([]predicate.Info{}, iq.predicates...), withUser: iq.withUser.Clone(), // clone intermediate query. diff --git a/entc/integration/edgefield/ent/metadata_query.go b/entc/integration/edgefield/ent/metadata_query.go index 6fd0cbd79..c91cb6be2 100644 --- a/entc/integration/edgefield/ent/metadata_query.go +++ b/entc/integration/edgefield/ent/metadata_query.go @@ -324,6 +324,7 @@ func (mq *MetadataQuery) Clone() *MetadataQuery { limit: mq.limit, offset: mq.offset, order: append([]OrderFunc{}, mq.order...), + inters: append([]Interceptor{}, mq.inters...), predicates: append([]predicate.Metadata{}, mq.predicates...), withUser: mq.withUser.Clone(), withChildren: mq.withChildren.Clone(), diff --git a/entc/integration/edgefield/ent/node_query.go b/entc/integration/edgefield/ent/node_query.go index ceba29ee4..1f9b5fdd0 100644 --- a/entc/integration/edgefield/ent/node_query.go +++ b/entc/integration/edgefield/ent/node_query.go @@ -300,6 +300,7 @@ func (nq *NodeQuery) Clone() *NodeQuery { limit: nq.limit, offset: nq.offset, order: append([]OrderFunc{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Node{}, nq.predicates...), withPrev: nq.withPrev.Clone(), withNext: nq.withNext.Clone(), diff --git a/entc/integration/edgefield/ent/pet_query.go b/entc/integration/edgefield/ent/pet_query.go index c5cb94ea1..64f2882de 100644 --- a/entc/integration/edgefield/ent/pet_query.go +++ b/entc/integration/edgefield/ent/pet_query.go @@ -277,6 +277,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. diff --git a/entc/integration/edgefield/ent/post_query.go b/entc/integration/edgefield/ent/post_query.go index a3c6e453d..7d45822f2 100644 --- a/entc/integration/edgefield/ent/post_query.go +++ b/entc/integration/edgefield/ent/post_query.go @@ -277,6 +277,7 @@ func (pq *PostQuery) Clone() *PostQuery { limit: pq.limit, offset: pq.offset, order: append([]OrderFunc{}, pq.order...), + inters: append([]Interceptor{}, pq.inters...), predicates: append([]predicate.Post{}, pq.predicates...), withAuthor: pq.withAuthor.Clone(), // clone intermediate query. diff --git a/entc/integration/edgefield/ent/rental_query.go b/entc/integration/edgefield/ent/rental_query.go index d20ac4705..f067fc7ff 100644 --- a/entc/integration/edgefield/ent/rental_query.go +++ b/entc/integration/edgefield/ent/rental_query.go @@ -302,6 +302,7 @@ func (rq *RentalQuery) Clone() *RentalQuery { limit: rq.limit, offset: rq.offset, order: append([]OrderFunc{}, rq.order...), + inters: append([]Interceptor{}, rq.inters...), predicates: append([]predicate.Rental{}, rq.predicates...), withUser: rq.withUser.Clone(), withCar: rq.withCar.Clone(), diff --git a/entc/integration/edgefield/ent/user_query.go b/entc/integration/edgefield/ent/user_query.go index f4feedfc7..aab0544fb 100644 --- a/entc/integration/edgefield/ent/user_query.go +++ b/entc/integration/edgefield/ent/user_query.go @@ -443,6 +443,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(), withParent: uq.withParent.Clone(), diff --git a/entc/integration/edgeschema/ent/friendship_query.go b/entc/integration/edgeschema/ent/friendship_query.go index 57433b3d1..e8fb55b31 100644 --- a/entc/integration/edgeschema/ent/friendship_query.go +++ b/entc/integration/edgeschema/ent/friendship_query.go @@ -300,6 +300,7 @@ func (fq *FriendshipQuery) Clone() *FriendshipQuery { limit: fq.limit, offset: fq.offset, order: append([]OrderFunc{}, fq.order...), + inters: append([]Interceptor{}, fq.inters...), predicates: append([]predicate.Friendship{}, fq.predicates...), withUser: fq.withUser.Clone(), withFriend: fq.withFriend.Clone(), diff --git a/entc/integration/edgeschema/ent/group_query.go b/entc/integration/edgeschema/ent/group_query.go index c45f0d5b5..658d66fa2 100644 --- a/entc/integration/edgeschema/ent/group_query.go +++ b/entc/integration/edgeschema/ent/group_query.go @@ -350,6 +350,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(), withTags: gq.withTags.Clone(), diff --git a/entc/integration/edgeschema/ent/grouptag_query.go b/entc/integration/edgeschema/ent/grouptag_query.go index 07842322e..a3a8c9967 100644 --- a/entc/integration/edgeschema/ent/grouptag_query.go +++ b/entc/integration/edgeschema/ent/grouptag_query.go @@ -301,6 +301,7 @@ func (gtq *GroupTagQuery) Clone() *GroupTagQuery { limit: gtq.limit, offset: gtq.offset, order: append([]OrderFunc{}, gtq.order...), + inters: append([]Interceptor{}, gtq.inters...), predicates: append([]predicate.GroupTag{}, gtq.predicates...), withTag: gtq.withTag.Clone(), withGroup: gtq.withGroup.Clone(), diff --git a/entc/integration/edgeschema/ent/relationship_query.go b/entc/integration/edgeschema/ent/relationship_query.go index d9f2b7cf6..f49d5b2bc 100644 --- a/entc/integration/edgeschema/ent/relationship_query.go +++ b/entc/integration/edgeschema/ent/relationship_query.go @@ -254,6 +254,7 @@ func (rq *RelationshipQuery) Clone() *RelationshipQuery { limit: rq.limit, offset: rq.offset, order: append([]OrderFunc{}, rq.order...), + inters: append([]Interceptor{}, rq.inters...), predicates: append([]predicate.Relationship{}, rq.predicates...), withUser: rq.withUser.Clone(), withRelative: rq.withRelative.Clone(), diff --git a/entc/integration/edgeschema/ent/relationshipinfo_query.go b/entc/integration/edgeschema/ent/relationshipinfo_query.go index c4151a6cf..c206e83f9 100644 --- a/entc/integration/edgeschema/ent/relationshipinfo_query.go +++ b/entc/integration/edgeschema/ent/relationshipinfo_query.go @@ -253,6 +253,7 @@ func (riq *RelationshipInfoQuery) Clone() *RelationshipInfoQuery { limit: riq.limit, offset: riq.offset, order: append([]OrderFunc{}, riq.order...), + inters: append([]Interceptor{}, riq.inters...), predicates: append([]predicate.RelationshipInfo{}, riq.predicates...), // clone intermediate query. sql: riq.sql.Clone(), diff --git a/entc/integration/edgeschema/ent/role_query.go b/entc/integration/edgeschema/ent/role_query.go index 17739c082..251d9c428 100644 --- a/entc/integration/edgeschema/ent/role_query.go +++ b/entc/integration/edgeschema/ent/role_query.go @@ -302,6 +302,7 @@ func (rq *RoleQuery) Clone() *RoleQuery { limit: rq.limit, offset: rq.offset, order: append([]OrderFunc{}, rq.order...), + inters: append([]Interceptor{}, rq.inters...), predicates: append([]predicate.Role{}, rq.predicates...), withUser: rq.withUser.Clone(), withRolesUsers: rq.withRolesUsers.Clone(), diff --git a/entc/integration/edgeschema/ent/roleuser_query.go b/entc/integration/edgeschema/ent/roleuser_query.go index d82d81828..789cf1c39 100644 --- a/entc/integration/edgeschema/ent/roleuser_query.go +++ b/entc/integration/edgeschema/ent/roleuser_query.go @@ -230,6 +230,7 @@ func (ruq *RoleUserQuery) Clone() *RoleUserQuery { limit: ruq.limit, offset: ruq.offset, order: append([]OrderFunc{}, ruq.order...), + inters: append([]Interceptor{}, ruq.inters...), predicates: append([]predicate.RoleUser{}, ruq.predicates...), withRole: ruq.withRole.Clone(), withUser: ruq.withUser.Clone(), diff --git a/entc/integration/edgeschema/ent/tag_query.go b/entc/integration/edgeschema/ent/tag_query.go index 2756bd4f4..554e1a7d0 100644 --- a/entc/integration/edgeschema/ent/tag_query.go +++ b/entc/integration/edgeschema/ent/tag_query.go @@ -350,6 +350,7 @@ func (tq *TagQuery) Clone() *TagQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Tag{}, tq.predicates...), withTweets: tq.withTweets.Clone(), withGroups: tq.withGroups.Clone(), diff --git a/entc/integration/edgeschema/ent/tweet_query.go b/entc/integration/edgeschema/ent/tweet_query.go index 36f46031a..8ff37f3a8 100644 --- a/entc/integration/edgeschema/ent/tweet_query.go +++ b/entc/integration/edgeschema/ent/tweet_query.go @@ -397,6 +397,7 @@ func (tq *TweetQuery) Clone() *TweetQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Tweet{}, tq.predicates...), withLikedUsers: tq.withLikedUsers.Clone(), withUser: tq.withUser.Clone(), diff --git a/entc/integration/edgeschema/ent/tweetlike_query.go b/entc/integration/edgeschema/ent/tweetlike_query.go index e5c53cac4..e78b9453c 100644 --- a/entc/integration/edgeschema/ent/tweetlike_query.go +++ b/entc/integration/edgeschema/ent/tweetlike_query.go @@ -231,6 +231,7 @@ func (tlq *TweetLikeQuery) Clone() *TweetLikeQuery { limit: tlq.limit, offset: tlq.offset, order: append([]OrderFunc{}, tlq.order...), + inters: append([]Interceptor{}, tlq.inters...), predicates: append([]predicate.TweetLike{}, tlq.predicates...), withTweet: tlq.withTweet.Clone(), withUser: tlq.withUser.Clone(), diff --git a/entc/integration/edgeschema/ent/tweettag_query.go b/entc/integration/edgeschema/ent/tweettag_query.go index b74806dc5..afbb088a1 100644 --- a/entc/integration/edgeschema/ent/tweettag_query.go +++ b/entc/integration/edgeschema/ent/tweettag_query.go @@ -302,6 +302,7 @@ func (ttq *TweetTagQuery) Clone() *TweetTagQuery { limit: ttq.limit, offset: ttq.offset, order: append([]OrderFunc{}, ttq.order...), + inters: append([]Interceptor{}, ttq.inters...), predicates: append([]predicate.TweetTag{}, ttq.predicates...), withTag: ttq.withTag.Clone(), withTweet: ttq.withTweet.Clone(), diff --git a/entc/integration/edgeschema/ent/user_query.go b/entc/integration/edgeschema/ent/user_query.go index 9ca8532f4..c2bf89d55 100644 --- a/entc/integration/edgeschema/ent/user_query.go +++ b/entc/integration/edgeschema/ent/user_query.go @@ -540,6 +540,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...), withGroups: uq.withGroups.Clone(), withFriends: uq.withFriends.Clone(), diff --git a/entc/integration/edgeschema/ent/usergroup_query.go b/entc/integration/edgeschema/ent/usergroup_query.go index 97fbd5153..00a721597 100644 --- a/entc/integration/edgeschema/ent/usergroup_query.go +++ b/entc/integration/edgeschema/ent/usergroup_query.go @@ -301,6 +301,7 @@ func (ugq *UserGroupQuery) Clone() *UserGroupQuery { limit: ugq.limit, offset: ugq.offset, order: append([]OrderFunc{}, ugq.order...), + inters: append([]Interceptor{}, ugq.inters...), predicates: append([]predicate.UserGroup{}, ugq.predicates...), withUser: ugq.withUser.Clone(), withGroup: ugq.withGroup.Clone(), diff --git a/entc/integration/edgeschema/ent/usertweet_query.go b/entc/integration/edgeschema/ent/usertweet_query.go index d330ed889..abed52652 100644 --- a/entc/integration/edgeschema/ent/usertweet_query.go +++ b/entc/integration/edgeschema/ent/usertweet_query.go @@ -301,6 +301,7 @@ func (utq *UserTweetQuery) Clone() *UserTweetQuery { limit: utq.limit, offset: utq.offset, order: append([]OrderFunc{}, utq.order...), + inters: append([]Interceptor{}, utq.inters...), predicates: append([]predicate.UserTweet{}, utq.predicates...), withUser: utq.withUser.Clone(), withTweet: utq.withTweet.Clone(), diff --git a/entc/integration/ent/card_query.go b/entc/integration/ent/card_query.go index 30fba38a5..442159c2f 100644 --- a/entc/integration/ent/card_query.go +++ b/entc/integration/ent/card_query.go @@ -306,6 +306,7 @@ func (cq *CardQuery) Clone() *CardQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Card{}, cq.predicates...), withOwner: cq.withOwner.Clone(), withSpec: cq.withSpec.Clone(), diff --git a/entc/integration/ent/comment_query.go b/entc/integration/ent/comment_query.go index 5579a169e..971e095ea 100644 --- a/entc/integration/ent/comment_query.go +++ b/entc/integration/ent/comment_query.go @@ -255,6 +255,7 @@ func (cq *CommentQuery) Clone() *CommentQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Comment{}, cq.predicates...), // clone intermediate query. sql: cq.sql.Clone(), diff --git a/entc/integration/ent/fieldtype_query.go b/entc/integration/ent/fieldtype_query.go index 6f5f3a2cd..cfd1768ae 100644 --- a/entc/integration/ent/fieldtype_query.go +++ b/entc/integration/ent/fieldtype_query.go @@ -256,6 +256,7 @@ func (ftq *FieldTypeQuery) Clone() *FieldTypeQuery { limit: ftq.limit, offset: ftq.offset, order: append([]OrderFunc{}, ftq.order...), + inters: append([]Interceptor{}, ftq.inters...), predicates: append([]predicate.FieldType{}, ftq.predicates...), // clone intermediate query. sql: ftq.sql.Clone(), diff --git a/entc/integration/ent/file_query.go b/entc/integration/ent/file_query.go index 6cb85fd8d..dc8f794f0 100644 --- a/entc/integration/ent/file_query.go +++ b/entc/integration/ent/file_query.go @@ -330,6 +330,7 @@ func (fq *FileQuery) Clone() *FileQuery { limit: fq.limit, offset: fq.offset, order: append([]OrderFunc{}, fq.order...), + inters: append([]Interceptor{}, fq.inters...), predicates: append([]predicate.File{}, fq.predicates...), withOwner: fq.withOwner.Clone(), withType: fq.withType.Clone(), diff --git a/entc/integration/ent/filetype_query.go b/entc/integration/ent/filetype_query.go index c6745e01d..4ec15bdbb 100644 --- a/entc/integration/ent/filetype_query.go +++ b/entc/integration/ent/filetype_query.go @@ -281,6 +281,7 @@ func (ftq *FileTypeQuery) Clone() *FileTypeQuery { limit: ftq.limit, offset: ftq.offset, order: append([]OrderFunc{}, ftq.order...), + inters: append([]Interceptor{}, ftq.inters...), predicates: append([]predicate.FileType{}, ftq.predicates...), withFiles: ftq.withFiles.Clone(), // clone intermediate query. diff --git a/entc/integration/ent/goods_query.go b/entc/integration/ent/goods_query.go index b98e4ce98..0795b1775 100644 --- a/entc/integration/ent/goods_query.go +++ b/entc/integration/ent/goods_query.go @@ -255,6 +255,7 @@ func (gq *GoodsQuery) Clone() *GoodsQuery { limit: gq.limit, offset: gq.offset, order: append([]OrderFunc{}, gq.order...), + inters: append([]Interceptor{}, gq.inters...), predicates: append([]predicate.Goods{}, gq.predicates...), // clone intermediate query. sql: gq.sql.Clone(), diff --git a/entc/integration/ent/group_query.go b/entc/integration/ent/group_query.go index fd8fdd779..7c051eace 100644 --- a/entc/integration/ent/group_query.go +++ b/entc/integration/ent/group_query.go @@ -355,6 +355,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...), withFiles: gq.withFiles.Clone(), withBlocked: gq.withBlocked.Clone(), diff --git a/entc/integration/ent/groupinfo_query.go b/entc/integration/ent/groupinfo_query.go index 3f6b03fdf..3587c22d1 100644 --- a/entc/integration/ent/groupinfo_query.go +++ b/entc/integration/ent/groupinfo_query.go @@ -281,6 +281,7 @@ func (giq *GroupInfoQuery) Clone() *GroupInfoQuery { limit: giq.limit, offset: giq.offset, order: append([]OrderFunc{}, giq.order...), + inters: append([]Interceptor{}, giq.inters...), predicates: append([]predicate.GroupInfo{}, giq.predicates...), withGroups: giq.withGroups.Clone(), // clone intermediate query. diff --git a/entc/integration/ent/item_query.go b/entc/integration/ent/item_query.go index 3ed5fd548..0424f5f00 100644 --- a/entc/integration/ent/item_query.go +++ b/entc/integration/ent/item_query.go @@ -255,6 +255,7 @@ func (iq *ItemQuery) Clone() *ItemQuery { limit: iq.limit, offset: iq.offset, order: append([]OrderFunc{}, iq.order...), + inters: append([]Interceptor{}, iq.inters...), predicates: append([]predicate.Item{}, iq.predicates...), // clone intermediate query. sql: iq.sql.Clone(), diff --git a/entc/integration/ent/license_query.go b/entc/integration/ent/license_query.go index feaf89ad5..13e1f2a65 100644 --- a/entc/integration/ent/license_query.go +++ b/entc/integration/ent/license_query.go @@ -255,6 +255,7 @@ func (lq *LicenseQuery) Clone() *LicenseQuery { limit: lq.limit, offset: lq.offset, order: append([]OrderFunc{}, lq.order...), + inters: append([]Interceptor{}, lq.inters...), predicates: append([]predicate.License{}, lq.predicates...), // clone intermediate query. sql: lq.sql.Clone(), diff --git a/entc/integration/ent/node_query.go b/entc/integration/ent/node_query.go index 05712b027..64d1459d0 100644 --- a/entc/integration/ent/node_query.go +++ b/entc/integration/ent/node_query.go @@ -303,6 +303,7 @@ func (nq *NodeQuery) Clone() *NodeQuery { limit: nq.limit, offset: nq.offset, order: append([]OrderFunc{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Node{}, nq.predicates...), withPrev: nq.withPrev.Clone(), withNext: nq.withNext.Clone(), diff --git a/entc/integration/ent/pet_query.go b/entc/integration/ent/pet_query.go index e705f7336..7bde4030b 100644 --- a/entc/integration/ent/pet_query.go +++ b/entc/integration/ent/pet_query.go @@ -303,6 +303,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...), withTeam: pq.withTeam.Clone(), withOwner: pq.withOwner.Clone(), diff --git a/entc/integration/ent/spec_query.go b/entc/integration/ent/spec_query.go index 2c41e73c7..21ce5e3af 100644 --- a/entc/integration/ent/spec_query.go +++ b/entc/integration/ent/spec_query.go @@ -281,6 +281,7 @@ func (sq *SpecQuery) Clone() *SpecQuery { limit: sq.limit, offset: sq.offset, order: append([]OrderFunc{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), predicates: append([]predicate.Spec{}, sq.predicates...), withCard: sq.withCard.Clone(), // clone intermediate query. diff --git a/entc/integration/ent/task_query.go b/entc/integration/ent/task_query.go index c4404f34d..2a2696fb0 100644 --- a/entc/integration/ent/task_query.go +++ b/entc/integration/ent/task_query.go @@ -256,6 +256,7 @@ func (tq *TaskQuery) Clone() *TaskQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Task{}, tq.predicates...), // clone intermediate query. sql: tq.sql.Clone(), diff --git a/entc/integration/ent/user_query.go b/entc/integration/ent/user_query.go index 63feaad02..2a263b4b0 100644 --- a/entc/integration/ent/user_query.go +++ b/entc/integration/ent/user_query.go @@ -521,6 +521,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...), withCard: uq.withCard.Clone(), withPets: uq.withPets.Clone(), diff --git a/entc/integration/gremlin/ent/card_query.go b/entc/integration/gremlin/ent/card_query.go index 0930ba4d4..25ee9c341 100644 --- a/entc/integration/gremlin/ent/card_query.go +++ b/entc/integration/gremlin/ent/card_query.go @@ -286,6 +286,7 @@ func (cq *CardQuery) Clone() *CardQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Card{}, cq.predicates...), withOwner: cq.withOwner.Clone(), withSpec: cq.withSpec.Clone(), diff --git a/entc/integration/gremlin/ent/comment_query.go b/entc/integration/gremlin/ent/comment_query.go index d6a283445..bf1b8f105 100644 --- a/entc/integration/gremlin/ent/comment_query.go +++ b/entc/integration/gremlin/ent/comment_query.go @@ -254,6 +254,7 @@ func (cq *CommentQuery) Clone() *CommentQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Comment{}, cq.predicates...), // clone intermediate query. gremlin: cq.gremlin.Clone(), diff --git a/entc/integration/gremlin/ent/fieldtype_query.go b/entc/integration/gremlin/ent/fieldtype_query.go index 45649011b..d62491f30 100644 --- a/entc/integration/gremlin/ent/fieldtype_query.go +++ b/entc/integration/gremlin/ent/fieldtype_query.go @@ -254,6 +254,7 @@ func (ftq *FieldTypeQuery) Clone() *FieldTypeQuery { limit: ftq.limit, offset: ftq.offset, order: append([]OrderFunc{}, ftq.order...), + inters: append([]Interceptor{}, ftq.inters...), predicates: append([]predicate.FieldType{}, ftq.predicates...), // clone intermediate query. gremlin: ftq.gremlin.Clone(), diff --git a/entc/integration/gremlin/ent/file_query.go b/entc/integration/gremlin/ent/file_query.go index 869b0b540..b9464f1b8 100644 --- a/entc/integration/gremlin/ent/file_query.go +++ b/entc/integration/gremlin/ent/file_query.go @@ -301,6 +301,7 @@ func (fq *FileQuery) Clone() *FileQuery { limit: fq.limit, offset: fq.offset, order: append([]OrderFunc{}, fq.order...), + inters: append([]Interceptor{}, fq.inters...), predicates: append([]predicate.File{}, fq.predicates...), withOwner: fq.withOwner.Clone(), withType: fq.withType.Clone(), diff --git a/entc/integration/gremlin/ent/filetype_query.go b/entc/integration/gremlin/ent/filetype_query.go index 60a9fb0e7..535d7e4ec 100644 --- a/entc/integration/gremlin/ent/filetype_query.go +++ b/entc/integration/gremlin/ent/filetype_query.go @@ -269,6 +269,7 @@ func (ftq *FileTypeQuery) Clone() *FileTypeQuery { limit: ftq.limit, offset: ftq.offset, order: append([]OrderFunc{}, ftq.order...), + inters: append([]Interceptor{}, ftq.inters...), predicates: append([]predicate.FileType{}, ftq.predicates...), withFiles: ftq.withFiles.Clone(), // clone intermediate query. diff --git a/entc/integration/gremlin/ent/goods_query.go b/entc/integration/gremlin/ent/goods_query.go index 2caae2c65..a553d7328 100644 --- a/entc/integration/gremlin/ent/goods_query.go +++ b/entc/integration/gremlin/ent/goods_query.go @@ -254,6 +254,7 @@ func (gq *GoodsQuery) Clone() *GoodsQuery { limit: gq.limit, offset: gq.offset, order: append([]OrderFunc{}, gq.order...), + inters: append([]Interceptor{}, gq.inters...), predicates: append([]predicate.Goods{}, gq.predicates...), // clone intermediate query. gremlin: gq.gremlin.Clone(), diff --git a/entc/integration/gremlin/ent/group_query.go b/entc/integration/gremlin/ent/group_query.go index 55ac95ed4..a0fb81cf3 100644 --- a/entc/integration/gremlin/ent/group_query.go +++ b/entc/integration/gremlin/ent/group_query.go @@ -315,6 +315,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...), withFiles: gq.withFiles.Clone(), withBlocked: gq.withBlocked.Clone(), diff --git a/entc/integration/gremlin/ent/groupinfo_query.go b/entc/integration/gremlin/ent/groupinfo_query.go index be75fc760..41e0dd7f0 100644 --- a/entc/integration/gremlin/ent/groupinfo_query.go +++ b/entc/integration/gremlin/ent/groupinfo_query.go @@ -270,6 +270,7 @@ func (giq *GroupInfoQuery) Clone() *GroupInfoQuery { limit: giq.limit, offset: giq.offset, order: append([]OrderFunc{}, giq.order...), + inters: append([]Interceptor{}, giq.inters...), predicates: append([]predicate.GroupInfo{}, giq.predicates...), withGroups: giq.withGroups.Clone(), // clone intermediate query. diff --git a/entc/integration/gremlin/ent/item_query.go b/entc/integration/gremlin/ent/item_query.go index 2afd9e7e2..792cfbe71 100644 --- a/entc/integration/gremlin/ent/item_query.go +++ b/entc/integration/gremlin/ent/item_query.go @@ -254,6 +254,7 @@ func (iq *ItemQuery) Clone() *ItemQuery { limit: iq.limit, offset: iq.offset, order: append([]OrderFunc{}, iq.order...), + inters: append([]Interceptor{}, iq.inters...), predicates: append([]predicate.Item{}, iq.predicates...), // clone intermediate query. gremlin: iq.gremlin.Clone(), diff --git a/entc/integration/gremlin/ent/license_query.go b/entc/integration/gremlin/ent/license_query.go index 3702cde54..2b137ae23 100644 --- a/entc/integration/gremlin/ent/license_query.go +++ b/entc/integration/gremlin/ent/license_query.go @@ -254,6 +254,7 @@ func (lq *LicenseQuery) Clone() *LicenseQuery { limit: lq.limit, offset: lq.offset, order: append([]OrderFunc{}, lq.order...), + inters: append([]Interceptor{}, lq.inters...), predicates: append([]predicate.License{}, lq.predicates...), // clone intermediate query. gremlin: lq.gremlin.Clone(), diff --git a/entc/integration/gremlin/ent/node_query.go b/entc/integration/gremlin/ent/node_query.go index ed95e05f6..3a22a996b 100644 --- a/entc/integration/gremlin/ent/node_query.go +++ b/entc/integration/gremlin/ent/node_query.go @@ -284,6 +284,7 @@ func (nq *NodeQuery) Clone() *NodeQuery { limit: nq.limit, offset: nq.offset, order: append([]OrderFunc{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Node{}, nq.predicates...), withPrev: nq.withPrev.Clone(), withNext: nq.withNext.Clone(), diff --git a/entc/integration/gremlin/ent/pet_query.go b/entc/integration/gremlin/ent/pet_query.go index bb9161508..e01c20909 100644 --- a/entc/integration/gremlin/ent/pet_query.go +++ b/entc/integration/gremlin/ent/pet_query.go @@ -285,6 +285,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...), withTeam: pq.withTeam.Clone(), withOwner: pq.withOwner.Clone(), diff --git a/entc/integration/gremlin/ent/spec_query.go b/entc/integration/gremlin/ent/spec_query.go index b4f5df6bd..d5eb6f997 100644 --- a/entc/integration/gremlin/ent/spec_query.go +++ b/entc/integration/gremlin/ent/spec_query.go @@ -269,6 +269,7 @@ func (sq *SpecQuery) Clone() *SpecQuery { limit: sq.limit, offset: sq.offset, order: append([]OrderFunc{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), predicates: append([]predicate.Spec{}, sq.predicates...), withCard: sq.withCard.Clone(), // clone intermediate query. diff --git a/entc/integration/gremlin/ent/task_query.go b/entc/integration/gremlin/ent/task_query.go index f32e0a421..440dafa74 100644 --- a/entc/integration/gremlin/ent/task_query.go +++ b/entc/integration/gremlin/ent/task_query.go @@ -255,6 +255,7 @@ func (tq *TaskQuery) Clone() *TaskQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Task{}, tq.predicates...), // clone intermediate query. gremlin: tq.gremlin.Clone(), diff --git a/entc/integration/gremlin/ent/user_query.go b/entc/integration/gremlin/ent/user_query.go index 1a461d927..e5183ddca 100644 --- a/entc/integration/gremlin/ent/user_query.go +++ b/entc/integration/gremlin/ent/user_query.go @@ -419,6 +419,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...), withCard: uq.withCard.Clone(), withPets: uq.withPets.Clone(), diff --git a/entc/integration/hooks/ent/card_query.go b/entc/integration/hooks/ent/card_query.go index bf8c71800..f3fd2bd80 100644 --- a/entc/integration/hooks/ent/card_query.go +++ b/entc/integration/hooks/ent/card_query.go @@ -278,6 +278,7 @@ func (cq *CardQuery) Clone() *CardQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Card{}, cq.predicates...), withOwner: cq.withOwner.Clone(), // clone intermediate query. diff --git a/entc/integration/hooks/ent/pet_query.go b/entc/integration/hooks/ent/pet_query.go index aa714bdb9..9fcf33146 100644 --- a/entc/integration/hooks/ent/pet_query.go +++ b/entc/integration/hooks/ent/pet_query.go @@ -278,6 +278,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. diff --git a/entc/integration/hooks/ent/user_query.go b/entc/integration/hooks/ent/user_query.go index c7417dc46..4030f2891 100644 --- a/entc/integration/hooks/ent/user_query.go +++ b/entc/integration/hooks/ent/user_query.go @@ -349,6 +349,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...), withCards: uq.withCards.Clone(), withPets: uq.withPets.Clone(), diff --git a/entc/integration/hooks/hooks_test.go b/entc/integration/hooks/hooks_test.go index 749c3d67c..3650bcc23 100644 --- a/entc/integration/hooks/hooks_test.go +++ b/entc/integration/hooks/hooks_test.go @@ -600,6 +600,32 @@ func TestInterceptor_Sanity(t *testing.T) { require.Equal(t, []n2c{{"nati", 1}, {"fake", 10}}, vs) require.Equal(t, 2, calls) }) + t.Run("Clone", func(t *testing.T) { + var ( + calls int + client = enttest.Open(t, dialect.SQLite, "file:ent?mode=memory&_fk=1") + ) + defer client.Close() + client.Intercept( + ent.InterceptFunc(func(next ent.Querier) ent.Querier { + return ent.QuerierFunc(func(ctx context.Context, query ent.Query) (ent.Value, error) { + calls++ + count, err := next.Query(ctx, query) + require.NoError(t, err) + require.Equal(t, 0, count) + return count, nil + }) + }), + intercept.TraverseFunc(func(ctx context.Context, query intercept.Query) error { + calls++ + return nil + }), + ) + client.User.Query().CountX(ctx) + require.Equal(t, 2, calls) + client.User.Query().Clone().CountX(ctx) + require.Equal(t, 4, calls) + }) } func TestSoftDelete(t *testing.T) { diff --git a/entc/integration/idtype/ent/user_query.go b/entc/integration/idtype/ent/user_query.go index 6e4ae184e..58850c7a3 100644 --- a/entc/integration/idtype/ent/user_query.go +++ b/entc/integration/idtype/ent/user_query.go @@ -324,6 +324,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...), withSpouse: uq.withSpouse.Clone(), withFollowers: uq.withFollowers.Clone(), diff --git a/entc/integration/json/ent/user_query.go b/entc/integration/json/ent/user_query.go index ed8b81567..f019a24c9 100644 --- a/entc/integration/json/ent/user_query.go +++ b/entc/integration/json/ent/user_query.go @@ -254,6 +254,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...), // clone intermediate query. sql: uq.sql.Clone(), diff --git a/entc/integration/migrate/entv1/car_query.go b/entc/integration/migrate/entv1/car_query.go index 7480cc91d..3b3708168 100644 --- a/entc/integration/migrate/entv1/car_query.go +++ b/entc/integration/migrate/entv1/car_query.go @@ -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. diff --git a/entc/integration/migrate/entv1/conversion_query.go b/entc/integration/migrate/entv1/conversion_query.go index a7055d9e0..c5c0d651f 100644 --- a/entc/integration/migrate/entv1/conversion_query.go +++ b/entc/integration/migrate/entv1/conversion_query.go @@ -253,6 +253,7 @@ func (cq *ConversionQuery) Clone() *ConversionQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Conversion{}, cq.predicates...), // clone intermediate query. sql: cq.sql.Clone(), diff --git a/entc/integration/migrate/entv1/customtype_query.go b/entc/integration/migrate/entv1/customtype_query.go index 7ad17d412..89975b8d0 100644 --- a/entc/integration/migrate/entv1/customtype_query.go +++ b/entc/integration/migrate/entv1/customtype_query.go @@ -253,6 +253,7 @@ func (ctq *CustomTypeQuery) Clone() *CustomTypeQuery { limit: ctq.limit, offset: ctq.offset, order: append([]OrderFunc{}, ctq.order...), + inters: append([]Interceptor{}, ctq.inters...), predicates: append([]predicate.CustomType{}, ctq.predicates...), // clone intermediate query. sql: ctq.sql.Clone(), diff --git a/entc/integration/migrate/entv1/user_query.go b/entc/integration/migrate/entv1/user_query.go index 4a8cbb964..96023d02b 100644 --- a/entc/integration/migrate/entv1/user_query.go +++ b/entc/integration/migrate/entv1/user_query.go @@ -348,6 +348,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...), withParent: uq.withParent.Clone(), withChildren: uq.withChildren.Clone(), diff --git a/entc/integration/migrate/entv2/blog_query.go b/entc/integration/migrate/entv2/blog_query.go index 0b829d1ee..aa496ef80 100644 --- a/entc/integration/migrate/entv2/blog_query.go +++ b/entc/integration/migrate/entv2/blog_query.go @@ -278,6 +278,7 @@ func (bq *BlogQuery) Clone() *BlogQuery { limit: bq.limit, offset: bq.offset, order: append([]OrderFunc{}, bq.order...), + inters: append([]Interceptor{}, bq.inters...), predicates: append([]predicate.Blog{}, bq.predicates...), withAdmins: bq.withAdmins.Clone(), // clone intermediate query. diff --git a/entc/integration/migrate/entv2/car_query.go b/entc/integration/migrate/entv2/car_query.go index 2fb206d49..a1165f8b1 100644 --- a/entc/integration/migrate/entv2/car_query.go +++ b/entc/integration/migrate/entv2/car_query.go @@ -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. diff --git a/entc/integration/migrate/entv2/conversion_query.go b/entc/integration/migrate/entv2/conversion_query.go index c6c8fad75..a7068eedc 100644 --- a/entc/integration/migrate/entv2/conversion_query.go +++ b/entc/integration/migrate/entv2/conversion_query.go @@ -253,6 +253,7 @@ func (cq *ConversionQuery) Clone() *ConversionQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Conversion{}, cq.predicates...), // clone intermediate query. sql: cq.sql.Clone(), diff --git a/entc/integration/migrate/entv2/customtype_query.go b/entc/integration/migrate/entv2/customtype_query.go index 5800d6727..9dbd92bf1 100644 --- a/entc/integration/migrate/entv2/customtype_query.go +++ b/entc/integration/migrate/entv2/customtype_query.go @@ -253,6 +253,7 @@ func (ctq *CustomTypeQuery) Clone() *CustomTypeQuery { limit: ctq.limit, offset: ctq.offset, order: append([]OrderFunc{}, ctq.order...), + inters: append([]Interceptor{}, ctq.inters...), predicates: append([]predicate.CustomType{}, ctq.predicates...), // clone intermediate query. sql: ctq.sql.Clone(), diff --git a/entc/integration/migrate/entv2/group_query.go b/entc/integration/migrate/entv2/group_query.go index 2eb1edceb..a866fa128 100644 --- a/entc/integration/migrate/entv2/group_query.go +++ b/entc/integration/migrate/entv2/group_query.go @@ -253,6 +253,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(), diff --git a/entc/integration/migrate/entv2/media_query.go b/entc/integration/migrate/entv2/media_query.go index 09b844489..c0611992d 100644 --- a/entc/integration/migrate/entv2/media_query.go +++ b/entc/integration/migrate/entv2/media_query.go @@ -253,6 +253,7 @@ func (mq *MediaQuery) Clone() *MediaQuery { limit: mq.limit, offset: mq.offset, order: append([]OrderFunc{}, mq.order...), + inters: append([]Interceptor{}, mq.inters...), predicates: append([]predicate.Media{}, mq.predicates...), // clone intermediate query. sql: mq.sql.Clone(), diff --git a/entc/integration/migrate/entv2/pet_query.go b/entc/integration/migrate/entv2/pet_query.go index b1e366f1d..fad943ee9 100644 --- a/entc/integration/migrate/entv2/pet_query.go +++ b/entc/integration/migrate/entv2/pet_query.go @@ -278,6 +278,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. diff --git a/entc/integration/migrate/entv2/user_query.go b/entc/integration/migrate/entv2/user_query.go index 788593858..e4603eda3 100644 --- a/entc/integration/migrate/entv2/user_query.go +++ b/entc/integration/migrate/entv2/user_query.go @@ -326,6 +326,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...), withCar: uq.withCar.Clone(), withPets: uq.withPets.Clone(), diff --git a/entc/integration/migrate/entv2/zoo_query.go b/entc/integration/migrate/entv2/zoo_query.go index 70493d8a6..82392cb9f 100644 --- a/entc/integration/migrate/entv2/zoo_query.go +++ b/entc/integration/migrate/entv2/zoo_query.go @@ -253,6 +253,7 @@ func (zq *ZooQuery) Clone() *ZooQuery { limit: zq.limit, offset: zq.offset, order: append([]OrderFunc{}, zq.order...), + inters: append([]Interceptor{}, zq.inters...), predicates: append([]predicate.Zoo{}, zq.predicates...), // clone intermediate query. sql: zq.sql.Clone(), diff --git a/entc/integration/migrate/versioned/group_query.go b/entc/integration/migrate/versioned/group_query.go index 6d7e605a9..fa6b63e07 100644 --- a/entc/integration/migrate/versioned/group_query.go +++ b/entc/integration/migrate/versioned/group_query.go @@ -253,6 +253,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(), diff --git a/entc/integration/migrate/versioned/user_query.go b/entc/integration/migrate/versioned/user_query.go index edb4811c9..370167033 100644 --- a/entc/integration/migrate/versioned/user_query.go +++ b/entc/integration/migrate/versioned/user_query.go @@ -253,6 +253,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...), // clone intermediate query. sql: uq.sql.Clone(), diff --git a/entc/integration/multischema/ent/friendship_query.go b/entc/integration/multischema/ent/friendship_query.go index 1532bb94e..521f662a7 100644 --- a/entc/integration/multischema/ent/friendship_query.go +++ b/entc/integration/multischema/ent/friendship_query.go @@ -308,6 +308,7 @@ func (fq *FriendshipQuery) Clone() *FriendshipQuery { limit: fq.limit, offset: fq.offset, order: append([]OrderFunc{}, fq.order...), + inters: append([]Interceptor{}, fq.inters...), predicates: append([]predicate.Friendship{}, fq.predicates...), withUser: fq.withUser.Clone(), withFriend: fq.withFriend.Clone(), diff --git a/entc/integration/multischema/ent/group_query.go b/entc/integration/multischema/ent/group_query.go index 4b35f4e08..6e9fde295 100644 --- a/entc/integration/multischema/ent/group_query.go +++ b/entc/integration/multischema/ent/group_query.go @@ -283,6 +283,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. diff --git a/entc/integration/multischema/ent/pet_query.go b/entc/integration/multischema/ent/pet_query.go index c8471a2e9..9937f3449 100644 --- a/entc/integration/multischema/ent/pet_query.go +++ b/entc/integration/multischema/ent/pet_query.go @@ -282,6 +282,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. diff --git a/entc/integration/multischema/ent/user_query.go b/entc/integration/multischema/ent/user_query.go index f081e24dc..1f87d6e44 100644 --- a/entc/integration/multischema/ent/user_query.go +++ b/entc/integration/multischema/ent/user_query.go @@ -363,6 +363,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(), withGroups: uq.withGroups.Clone(), diff --git a/entc/integration/privacy/ent/task_query.go b/entc/integration/privacy/ent/task_query.go index 7f8846134..d2465c99d 100644 --- a/entc/integration/privacy/ent/task_query.go +++ b/entc/integration/privacy/ent/task_query.go @@ -304,6 +304,7 @@ func (tq *TaskQuery) Clone() *TaskQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Task{}, tq.predicates...), withTeams: tq.withTeams.Clone(), withOwner: tq.withOwner.Clone(), diff --git a/entc/integration/privacy/ent/team_query.go b/entc/integration/privacy/ent/team_query.go index c2bf5dd1d..2983713b6 100644 --- a/entc/integration/privacy/ent/team_query.go +++ b/entc/integration/privacy/ent/team_query.go @@ -303,6 +303,7 @@ func (tq *TeamQuery) Clone() *TeamQuery { limit: tq.limit, offset: tq.offset, order: append([]OrderFunc{}, tq.order...), + inters: append([]Interceptor{}, tq.inters...), predicates: append([]predicate.Team{}, tq.predicates...), withTasks: tq.withTasks.Clone(), withUsers: tq.withUsers.Clone(), diff --git a/entc/integration/privacy/ent/user_query.go b/entc/integration/privacy/ent/user_query.go index 7b3bd0f46..6a54cff86 100644 --- a/entc/integration/privacy/ent/user_query.go +++ b/entc/integration/privacy/ent/user_query.go @@ -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...), withTeams: uq.withTeams.Clone(), withTasks: uq.withTasks.Clone(), diff --git a/entc/integration/template/ent/group_query.go b/entc/integration/template/ent/group_query.go index 276878d6d..71054db19 100644 --- a/entc/integration/template/ent/group_query.go +++ b/entc/integration/template/ent/group_query.go @@ -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(), diff --git a/entc/integration/template/ent/pet_query.go b/entc/integration/template/ent/pet_query.go index 9bc4bd4d4..029b02f6d 100644 --- a/entc/integration/template/ent/pet_query.go +++ b/entc/integration/template/ent/pet_query.go @@ -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. diff --git a/entc/integration/template/ent/user_query.go b/entc/integration/template/ent/user_query.go index 38d2b73e5..610339532 100644 --- a/entc/integration/template/ent/user_query.go +++ b/entc/integration/template/ent/user_query.go @@ -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(), diff --git a/examples/edgeindex/ent/city_query.go b/examples/edgeindex/ent/city_query.go index 935583fa2..63d3de138 100644 --- a/examples/edgeindex/ent/city_query.go +++ b/examples/edgeindex/ent/city_query.go @@ -278,6 +278,7 @@ func (cq *CityQuery) Clone() *CityQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.City{}, cq.predicates...), withStreets: cq.withStreets.Clone(), // clone intermediate query. diff --git a/examples/edgeindex/ent/street_query.go b/examples/edgeindex/ent/street_query.go index cc4a7cc8a..86f770553 100644 --- a/examples/edgeindex/ent/street_query.go +++ b/examples/edgeindex/ent/street_query.go @@ -278,6 +278,7 @@ func (sq *StreetQuery) Clone() *StreetQuery { limit: sq.limit, offset: sq.offset, order: append([]OrderFunc{}, sq.order...), + inters: append([]Interceptor{}, sq.inters...), predicates: append([]predicate.Street{}, sq.predicates...), withCity: sq.withCity.Clone(), // clone intermediate query. diff --git a/examples/entcpkg/ent/user_query.go b/examples/entcpkg/ent/user_query.go index 9c6c3faf8..2af526a73 100644 --- a/examples/entcpkg/ent/user_query.go +++ b/examples/entcpkg/ent/user_query.go @@ -253,6 +253,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...), // clone intermediate query. sql: uq.sql.Clone(), diff --git a/examples/fs/ent/file_query.go b/examples/fs/ent/file_query.go index a71a3dd9d..88cde98b5 100644 --- a/examples/fs/ent/file_query.go +++ b/examples/fs/ent/file_query.go @@ -300,6 +300,7 @@ func (fq *FileQuery) Clone() *FileQuery { limit: fq.limit, offset: fq.offset, order: append([]OrderFunc{}, fq.order...), + inters: append([]Interceptor{}, fq.inters...), predicates: append([]predicate.File{}, fq.predicates...), withParent: fq.withParent.Clone(), withChildren: fq.withChildren.Clone(), diff --git a/examples/jsonencode/ent/card_query.go b/examples/jsonencode/ent/card_query.go index 40918e562..ce05293f4 100644 --- a/examples/jsonencode/ent/card_query.go +++ b/examples/jsonencode/ent/card_query.go @@ -253,6 +253,7 @@ func (cq *CardQuery) Clone() *CardQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Card{}, cq.predicates...), // clone intermediate query. sql: cq.sql.Clone(), diff --git a/examples/jsonencode/ent/pet_query.go b/examples/jsonencode/ent/pet_query.go index 9045b3ca0..a0cae2719 100644 --- a/examples/jsonencode/ent/pet_query.go +++ b/examples/jsonencode/ent/pet_query.go @@ -277,6 +277,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. diff --git a/examples/jsonencode/ent/user_query.go b/examples/jsonencode/ent/user_query.go index ed508cf50..74bdb59ad 100644 --- a/examples/jsonencode/ent/user_query.go +++ b/examples/jsonencode/ent/user_query.go @@ -278,6 +278,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(), // clone intermediate query. diff --git a/examples/m2m2types/ent/group_query.go b/examples/m2m2types/ent/group_query.go index 4fc400b42..f5d89aadb 100644 --- a/examples/m2m2types/ent/group_query.go +++ b/examples/m2m2types/ent/group_query.go @@ -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. diff --git a/examples/m2m2types/ent/user_query.go b/examples/m2m2types/ent/user_query.go index 6c1436786..98b5a5349 100644 --- a/examples/m2m2types/ent/user_query.go +++ b/examples/m2m2types/ent/user_query.go @@ -278,6 +278,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...), withGroups: uq.withGroups.Clone(), // clone intermediate query. diff --git a/examples/m2mbidi/ent/user_query.go b/examples/m2mbidi/ent/user_query.go index 34b530da9..bc5dc1155 100644 --- a/examples/m2mbidi/ent/user_query.go +++ b/examples/m2mbidi/ent/user_query.go @@ -277,6 +277,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...), withFriends: uq.withFriends.Clone(), // clone intermediate query. diff --git a/examples/m2mrecur/ent/user_query.go b/examples/m2mrecur/ent/user_query.go index 2ec9520cc..ec3ef31cb 100644 --- a/examples/m2mrecur/ent/user_query.go +++ b/examples/m2mrecur/ent/user_query.go @@ -300,6 +300,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...), withFollowers: uq.withFollowers.Clone(), withFollowing: uq.withFollowing.Clone(), diff --git a/examples/migration/ent/user_query.go b/examples/migration/ent/user_query.go index 32658b095..7933ce7b1 100644 --- a/examples/migration/ent/user_query.go +++ b/examples/migration/ent/user_query.go @@ -253,6 +253,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...), // clone intermediate query. sql: uq.sql.Clone(), diff --git a/examples/o2m2types/ent/pet_query.go b/examples/o2m2types/ent/pet_query.go index dbff54d9e..1a765830a 100644 --- a/examples/o2m2types/ent/pet_query.go +++ b/examples/o2m2types/ent/pet_query.go @@ -278,6 +278,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. diff --git a/examples/o2m2types/ent/user_query.go b/examples/o2m2types/ent/user_query.go index 628af40cc..3926e598c 100644 --- a/examples/o2m2types/ent/user_query.go +++ b/examples/o2m2types/ent/user_query.go @@ -278,6 +278,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(), // clone intermediate query. diff --git a/examples/o2mrecur/ent/node_query.go b/examples/o2mrecur/ent/node_query.go index 164518cbf..24db11f9e 100644 --- a/examples/o2mrecur/ent/node_query.go +++ b/examples/o2mrecur/ent/node_query.go @@ -301,6 +301,7 @@ func (nq *NodeQuery) Clone() *NodeQuery { limit: nq.limit, offset: nq.offset, order: append([]OrderFunc{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Node{}, nq.predicates...), withParent: nq.withParent.Clone(), withChildren: nq.withChildren.Clone(), diff --git a/examples/o2o2types/ent/card_query.go b/examples/o2o2types/ent/card_query.go index 2a315da36..3566a6301 100644 --- a/examples/o2o2types/ent/card_query.go +++ b/examples/o2o2types/ent/card_query.go @@ -278,6 +278,7 @@ func (cq *CardQuery) Clone() *CardQuery { limit: cq.limit, offset: cq.offset, order: append([]OrderFunc{}, cq.order...), + inters: append([]Interceptor{}, cq.inters...), predicates: append([]predicate.Card{}, cq.predicates...), withOwner: cq.withOwner.Clone(), // clone intermediate query. diff --git a/examples/o2o2types/ent/user_query.go b/examples/o2o2types/ent/user_query.go index e4e03accb..d5731e28d 100644 --- a/examples/o2o2types/ent/user_query.go +++ b/examples/o2o2types/ent/user_query.go @@ -278,6 +278,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...), withCard: uq.withCard.Clone(), // clone intermediate query. diff --git a/examples/o2obidi/ent/user_query.go b/examples/o2obidi/ent/user_query.go index dabcb78dd..3d3a14a4f 100644 --- a/examples/o2obidi/ent/user_query.go +++ b/examples/o2obidi/ent/user_query.go @@ -277,6 +277,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...), withSpouse: uq.withSpouse.Clone(), // clone intermediate query. diff --git a/examples/o2orecur/ent/node_query.go b/examples/o2orecur/ent/node_query.go index 6a5e7157e..2099cd7c7 100644 --- a/examples/o2orecur/ent/node_query.go +++ b/examples/o2orecur/ent/node_query.go @@ -301,6 +301,7 @@ func (nq *NodeQuery) Clone() *NodeQuery { limit: nq.limit, offset: nq.offset, order: append([]OrderFunc{}, nq.order...), + inters: append([]Interceptor{}, nq.inters...), predicates: append([]predicate.Node{}, nq.predicates...), withPrev: nq.withPrev.Clone(), withNext: nq.withNext.Clone(), diff --git a/examples/privacyadmin/ent/user_query.go b/examples/privacyadmin/ent/user_query.go index 0bf2f2075..b9576ceed 100644 --- a/examples/privacyadmin/ent/user_query.go +++ b/examples/privacyadmin/ent/user_query.go @@ -254,6 +254,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...), // clone intermediate query. sql: uq.sql.Clone(), diff --git a/examples/privacytenant/ent/group_query.go b/examples/privacytenant/ent/group_query.go index d7fb3203d..04506ffac 100644 --- a/examples/privacytenant/ent/group_query.go +++ b/examples/privacytenant/ent/group_query.go @@ -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(), diff --git a/examples/privacytenant/ent/tenant_query.go b/examples/privacytenant/ent/tenant_query.go index 1b80a9401..f6b1e1c73 100644 --- a/examples/privacytenant/ent/tenant_query.go +++ b/examples/privacytenant/ent/tenant_query.go @@ -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(), diff --git a/examples/privacytenant/ent/user_query.go b/examples/privacytenant/ent/user_query.go index 957180220..681bd5fe9 100644 --- a/examples/privacytenant/ent/user_query.go +++ b/examples/privacytenant/ent/user_query.go @@ -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(), diff --git a/examples/start/ent/car_query.go b/examples/start/ent/car_query.go index 5d6d947d5..ba317646f 100644 --- a/examples/start/ent/car_query.go +++ b/examples/start/ent/car_query.go @@ -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. diff --git a/examples/start/ent/group_query.go b/examples/start/ent/group_query.go index ab5ff8b76..06f09a235 100644 --- a/examples/start/ent/group_query.go +++ b/examples/start/ent/group_query.go @@ -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. diff --git a/examples/start/ent/user_query.go b/examples/start/ent/user_query.go index e49a60b09..28837edc2 100644 --- a/examples/start/ent/user_query.go +++ b/examples/start/ent/user_query.go @@ -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(), diff --git a/examples/traversal/ent/group_query.go b/examples/traversal/ent/group_query.go index e767a2772..973ae6cba 100644 --- a/examples/traversal/ent/group_query.go +++ b/examples/traversal/ent/group_query.go @@ -302,6 +302,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(), withAdmin: gq.withAdmin.Clone(), diff --git a/examples/traversal/ent/pet_query.go b/examples/traversal/ent/pet_query.go index 0900a27e8..618bb2a1c 100644 --- a/examples/traversal/ent/pet_query.go +++ b/examples/traversal/ent/pet_query.go @@ -302,6 +302,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...), withFriends: pq.withFriends.Clone(), withOwner: pq.withOwner.Clone(), diff --git a/examples/traversal/ent/user_query.go b/examples/traversal/ent/user_query.go index 9d9912ede..3e824d584 100644 --- a/examples/traversal/ent/user_query.go +++ b/examples/traversal/ent/user_query.go @@ -348,6 +348,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(), diff --git a/examples/version/ent/user_query.go b/examples/version/ent/user_query.go index 273f9a601..5734c9b3c 100644 --- a/examples/version/ent/user_query.go +++ b/examples/version/ent/user_query.go @@ -253,6 +253,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...), // clone intermediate query. sql: uq.sql.Clone(),