From 381483e45c57f0616fe30aebdbbf0ac590237c4e Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Sun, 4 Dec 2022 13:15:16 +0200 Subject: [PATCH] entc/gen: remove unnecessary sqlgraph.To step on HasE predicates (#3144) Predicate that checks existence-only do not need the 'other' table --- entc/gen/template/dialect/sql/predicate.tmpl | 9 +-------- entc/gen/type.go | 1 + entc/integration/cascadelete/ent/comment/where.go | 1 - entc/integration/cascadelete/ent/post/where.go | 2 -- entc/integration/cascadelete/ent/user/where.go | 1 - entc/integration/customid/ent/account/where.go | 1 - entc/integration/customid/ent/blob/where.go | 3 --- entc/integration/customid/ent/bloblink/where.go | 2 -- entc/integration/customid/ent/car/where.go | 1 - entc/integration/customid/ent/device/where.go | 2 -- entc/integration/customid/ent/doc/where.go | 3 --- entc/integration/customid/ent/group/where.go | 1 - entc/integration/customid/ent/intsid/where.go | 2 -- entc/integration/customid/ent/note/where.go | 2 -- entc/integration/customid/ent/pet/where.go | 4 ---- entc/integration/customid/ent/session/where.go | 1 - entc/integration/customid/ent/token/where.go | 1 - entc/integration/customid/ent/user/where.go | 4 ---- entc/integration/edgefield/ent/car/where.go | 1 - entc/integration/edgefield/ent/card/where.go | 1 - entc/integration/edgefield/ent/info/where.go | 1 - entc/integration/edgefield/ent/metadata/where.go | 3 --- entc/integration/edgefield/ent/node/where.go | 2 -- entc/integration/edgefield/ent/pet/where.go | 1 - entc/integration/edgefield/ent/post/where.go | 1 - entc/integration/edgefield/ent/rental/where.go | 2 -- entc/integration/edgefield/ent/user/where.go | 8 -------- entc/integration/edgeschema/ent/friendship/where.go | 2 -- entc/integration/edgeschema/ent/group/where.go | 4 ---- entc/integration/edgeschema/ent/grouptag/where.go | 2 -- .../integration/edgeschema/ent/relationship/where.go | 3 --- entc/integration/edgeschema/ent/role/where.go | 2 -- entc/integration/edgeschema/ent/roleuser/where.go | 2 -- entc/integration/edgeschema/ent/tag/where.go | 4 ---- entc/integration/edgeschema/ent/tweet/where.go | 6 ------ entc/integration/edgeschema/ent/tweetlike/where.go | 2 -- entc/integration/edgeschema/ent/tweettag/where.go | 2 -- entc/integration/edgeschema/ent/user/where.go | 12 ------------ entc/integration/edgeschema/ent/usergroup/where.go | 2 -- entc/integration/edgeschema/ent/usertweet/where.go | 2 -- entc/integration/ent/card/where.go | 2 -- entc/integration/ent/file/where.go | 3 --- entc/integration/ent/filetype/where.go | 1 - entc/integration/ent/group/where.go | 4 ---- entc/integration/ent/groupinfo/where.go | 1 - entc/integration/ent/node/where.go | 2 -- entc/integration/ent/pet/where.go | 2 -- entc/integration/ent/spec/where.go | 1 - entc/integration/ent/user/where.go | 11 ----------- entc/integration/hooks/ent/card/where.go | 1 - entc/integration/hooks/ent/user/where.go | 3 --- entc/integration/idtype/ent/user/where.go | 3 --- entc/integration/migrate/entv1/car/where.go | 1 - entc/integration/migrate/entv1/user/where.go | 4 ---- entc/integration/migrate/entv2/blog/where.go | 1 - entc/integration/migrate/entv2/car/where.go | 1 - entc/integration/migrate/entv2/pet/where.go | 1 - entc/integration/migrate/entv2/user/where.go | 3 --- entc/integration/multischema/ent/friendship/where.go | 2 -- entc/integration/multischema/ent/group/where.go | 1 - entc/integration/multischema/ent/pet/where.go | 1 - entc/integration/multischema/ent/user/where.go | 4 ---- entc/integration/privacy/ent/task/where.go | 2 -- entc/integration/privacy/ent/team/where.go | 2 -- entc/integration/privacy/ent/user/where.go | 2 -- entc/integration/template/ent/pet/where.go | 1 - entc/integration/template/ent/user/where.go | 2 -- examples/edgeindex/ent/city/where.go | 1 - examples/edgeindex/ent/street/where.go | 1 - examples/fs/ent/file/where.go | 2 -- examples/jsonencode/ent/pet/where.go | 1 - examples/jsonencode/ent/user/where.go | 1 - examples/m2m2types/ent/group/where.go | 1 - examples/m2m2types/ent/user/where.go | 1 - examples/m2mbidi/ent/user/where.go | 1 - examples/m2mrecur/ent/user/where.go | 2 -- examples/o2m2types/ent/pet/where.go | 1 - examples/o2m2types/ent/user/where.go | 1 - examples/o2mrecur/ent/node/where.go | 2 -- examples/o2o2types/ent/card/where.go | 1 - examples/o2o2types/ent/user/where.go | 1 - examples/o2obidi/ent/user/where.go | 1 - examples/o2orecur/ent/node/where.go | 2 -- examples/privacytenant/ent/group/where.go | 2 -- examples/privacytenant/ent/user/where.go | 2 -- examples/start/ent/car/where.go | 1 - examples/start/ent/group/where.go | 1 - examples/start/ent/user/where.go | 2 -- examples/traversal/ent/group/where.go | 2 -- examples/traversal/ent/pet/where.go | 2 -- examples/traversal/ent/user/where.go | 4 ---- 91 files changed, 2 insertions(+), 202 deletions(-) diff --git a/entc/gen/template/dialect/sql/predicate.tmpl b/entc/gen/template/dialect/sql/predicate.tmpl index 30a7f0921..b14534986 100644 --- a/entc/gen/template/dialect/sql/predicate.tmpl +++ b/entc/gen/template/dialect/sql/predicate.tmpl @@ -52,16 +52,8 @@ in the LICENSE file in the root directory of this source tree. {{- if $.HasCompositeID }} {{- /* Query that goes from the edge schema. */}} sqlgraph.From(Table, {{ $e.ColumnConstant }}), - sqlgraph.To({{ $e.InverseTableConstant }}, {{ print $e.Type.Name "FieldID" }}), {{- else }} sqlgraph.From(Table, {{ $.ID.Constant }}), - {{- if $e.Type.HasOneFieldID }} - {{- $refid := $.ID.Constant }}{{ if ne $e.Type.ID.StorageKey $.ID.StorageKey }}{{ $refid = print $e.Type.Name "FieldID" }}{{ end }} - sqlgraph.To({{ $e.TableConstant }}, {{ $refid }}), - {{- else }} - {{- /* Query that goes to the edge schema. */}} - sqlgraph.To({{ $e.TableConstant }}, {{ $e.ColumnConstant }}), - {{- end }} {{- end }} sqlgraph.Edge(sqlgraph.{{ $e.Rel.Type }}, {{ $e.IsInverse }}, {{ $e.TableConstant }}, {{- if $e.M2M -}} @@ -77,6 +69,7 @@ in the LICENSE file in the root directory of this source tree. {{- xtemplate $tmpl $ }} {{- end }} {{- end }} + {{- /* sqlgraph.To is meaningless on Has (without predicates), because unlike HasWith no predicates are applied on the "other" table. */}} sqlgraph.HasNeighbors(s, step) } {{- end }} diff --git a/entc/gen/type.go b/entc/gen/type.go index 995b0c1d8..8a8b8e5aa 100644 --- a/entc/gen/type.go +++ b/entc/gen/type.go @@ -1662,6 +1662,7 @@ func (e Edge) LabelConstant() string { func (e Edge) InverseLabelConstant() string { return pascal(e.Name) + "InverseLabel" } // TableConstant returns the constant name of the relation table. +// The value id Edge.Rel.Table, which is table that holds the relation/edge. func (e Edge) TableConstant() string { return pascal(e.Name) + "Table" } // InverseTableConstant returns the constant name of the other/inverse type of the relation. diff --git a/entc/integration/cascadelete/ent/comment/where.go b/entc/integration/cascadelete/ent/comment/where.go index b3a24e51c..313d06958 100644 --- a/entc/integration/cascadelete/ent/comment/where.go +++ b/entc/integration/cascadelete/ent/comment/where.go @@ -237,7 +237,6 @@ func HasPost() predicate.Comment { return predicate.Comment(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PostTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, PostTable, PostColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/cascadelete/ent/post/where.go b/entc/integration/cascadelete/ent/post/where.go index 06ec659d4..123b2fedf 100644 --- a/entc/integration/cascadelete/ent/post/where.go +++ b/entc/integration/cascadelete/ent/post/where.go @@ -251,7 +251,6 @@ func HasAuthor() predicate.Post { return predicate.Post(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(AuthorTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, AuthorTable, AuthorColumn), ) sqlgraph.HasNeighbors(s, step) @@ -279,7 +278,6 @@ func HasComments() predicate.Post { return predicate.Post(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CommentsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, CommentsTable, CommentsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/cascadelete/ent/user/where.go b/entc/integration/cascadelete/ent/user/where.go index 68bf008b7..8bbc1e9e9 100644 --- a/entc/integration/cascadelete/ent/user/where.go +++ b/entc/integration/cascadelete/ent/user/where.go @@ -194,7 +194,6 @@ func HasPosts() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PostsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PostsTable, PostsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/account/where.go b/entc/integration/customid/ent/account/where.go index 32470ee99..bb44757f0 100644 --- a/entc/integration/customid/ent/account/where.go +++ b/entc/integration/customid/ent/account/where.go @@ -195,7 +195,6 @@ func HasToken() predicate.Account { return predicate.Account(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TokenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, TokenTable, TokenColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/blob/where.go b/entc/integration/customid/ent/blob/where.go index 0451678df..bf28133ea 100644 --- a/entc/integration/customid/ent/blob/where.go +++ b/entc/integration/customid/ent/blob/where.go @@ -231,7 +231,6 @@ func HasParent() predicate.Blob { return predicate.Blob(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -259,7 +258,6 @@ func HasLinks() predicate.Blob { return predicate.Blob(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(LinksTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, LinksTable, LinksPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -287,7 +285,6 @@ func HasBlobLinks() predicate.Blob { return predicate.Blob(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(BlobLinksTable, BlobLinksColumn), sqlgraph.Edge(sqlgraph.O2M, true, BlobLinksTable, BlobLinksColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/bloblink/where.go b/entc/integration/customid/ent/bloblink/where.go index 669d25318..4210e4330 100644 --- a/entc/integration/customid/ent/bloblink/where.go +++ b/entc/integration/customid/ent/bloblink/where.go @@ -177,7 +177,6 @@ func HasBlob() predicate.BlobLink { return predicate.BlobLink(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, BlobColumn), - sqlgraph.To(BlobInverseTable, BlobFieldID), sqlgraph.Edge(sqlgraph.M2O, false, BlobTable, BlobColumn), ) sqlgraph.HasNeighbors(s, step) @@ -205,7 +204,6 @@ func HasLink() predicate.BlobLink { return predicate.BlobLink(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, LinkColumn), - sqlgraph.To(LinkInverseTable, BlobFieldID), sqlgraph.Edge(sqlgraph.M2O, false, LinkTable, LinkColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/car/where.go b/entc/integration/customid/ent/car/where.go index f01857ee4..e569fc83c 100644 --- a/entc/integration/customid/ent/car/where.go +++ b/entc/integration/customid/ent/car/where.go @@ -364,7 +364,6 @@ func HasOwner() predicate.Car { return predicate.Car(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/device/where.go b/entc/integration/customid/ent/device/where.go index 3f4e50fd2..f6b1515cb 100644 --- a/entc/integration/customid/ent/device/where.go +++ b/entc/integration/customid/ent/device/where.go @@ -89,7 +89,6 @@ func HasActiveSession() predicate.Device { return predicate.Device(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ActiveSessionTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, ActiveSessionTable, ActiveSessionColumn), ) sqlgraph.HasNeighbors(s, step) @@ -117,7 +116,6 @@ func HasSessions() predicate.Device { return predicate.Device(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SessionsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, SessionsTable, SessionsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/doc/where.go b/entc/integration/customid/ent/doc/where.go index 11067ae20..f16457bf3 100644 --- a/entc/integration/customid/ent/doc/where.go +++ b/entc/integration/customid/ent/doc/where.go @@ -209,7 +209,6 @@ func HasParent() predicate.Doc { return predicate.Doc(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -237,7 +236,6 @@ func HasChildren() predicate.Doc { return predicate.Doc(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) @@ -265,7 +263,6 @@ func HasRelated() predicate.Doc { return predicate.Doc(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RelatedTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, RelatedTable, RelatedPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/group/where.go b/entc/integration/customid/ent/group/where.go index 76a5ec677..b7de5bed1 100644 --- a/entc/integration/customid/ent/group/where.go +++ b/entc/integration/customid/ent/group/where.go @@ -88,7 +88,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2M, false, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/intsid/where.go b/entc/integration/customid/ent/intsid/where.go index 21e2c8c27..2c8e2c4af 100644 --- a/entc/integration/customid/ent/intsid/where.go +++ b/entc/integration/customid/ent/intsid/where.go @@ -89,7 +89,6 @@ func HasParent() predicate.IntSID { return predicate.IntSID(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -117,7 +116,6 @@ func HasChildren() predicate.IntSID { return predicate.IntSID(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/note/where.go b/entc/integration/customid/ent/note/where.go index c567abcad..dbde59345 100644 --- a/entc/integration/customid/ent/note/where.go +++ b/entc/integration/customid/ent/note/where.go @@ -209,7 +209,6 @@ func HasParent() predicate.Note { return predicate.Note(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -237,7 +236,6 @@ func HasChildren() predicate.Note { return predicate.Note(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/pet/where.go b/entc/integration/customid/ent/pet/where.go index 457c6c3f6..b745e3d89 100644 --- a/entc/integration/customid/ent/pet/where.go +++ b/entc/integration/customid/ent/pet/where.go @@ -88,7 +88,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) @@ -116,7 +115,6 @@ func HasCars() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CarsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, CarsTable, CarsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -144,7 +142,6 @@ func HasFriends() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -172,7 +169,6 @@ func HasBestFriend() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(BestFriendTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, BestFriendTable, BestFriendColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/session/where.go b/entc/integration/customid/ent/session/where.go index df20a6e42..8e2ba8881 100644 --- a/entc/integration/customid/ent/session/where.go +++ b/entc/integration/customid/ent/session/where.go @@ -89,7 +89,6 @@ func HasDevice() predicate.Session { return predicate.Session(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(DeviceTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, DeviceTable, DeviceColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/token/where.go b/entc/integration/customid/ent/token/where.go index a9d0a542c..c800dc073 100644 --- a/entc/integration/customid/ent/token/where.go +++ b/entc/integration/customid/ent/token/where.go @@ -195,7 +195,6 @@ func HasAccount() predicate.Token { return predicate.Token(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(AccountTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, AccountTable, AccountColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/customid/ent/user/where.go b/entc/integration/customid/ent/user/where.go index 34b16b7a7..10477c762 100644 --- a/entc/integration/customid/ent/user/where.go +++ b/entc/integration/customid/ent/user/where.go @@ -88,7 +88,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, GroupFieldID), sqlgraph.Edge(sqlgraph.M2M, true, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -116,7 +115,6 @@ func HasParent() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -144,7 +142,6 @@ func HasChildren() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) @@ -172,7 +169,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, PetFieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/car/where.go b/entc/integration/edgefield/ent/car/where.go index f0cb6e011..2b4991dc0 100644 --- a/entc/integration/edgefield/ent/car/where.go +++ b/entc/integration/edgefield/ent/car/where.go @@ -209,7 +209,6 @@ func HasRentals() predicate.Car { return predicate.Car(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RentalsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, RentalsTable, RentalsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/card/where.go b/entc/integration/edgefield/ent/card/where.go index 9fbf694df..6b85aa9b8 100644 --- a/entc/integration/edgefield/ent/card/where.go +++ b/entc/integration/edgefield/ent/card/where.go @@ -265,7 +265,6 @@ func HasOwner() predicate.Card { return predicate.Card(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/info/where.go b/entc/integration/edgefield/ent/info/where.go index a7cb1d7b7..bcaad25b0 100644 --- a/entc/integration/edgefield/ent/info/where.go +++ b/entc/integration/edgefield/ent/info/where.go @@ -88,7 +88,6 @@ func HasUser() predicate.Info { return predicate.Info(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/metadata/where.go b/entc/integration/edgefield/ent/metadata/where.go index 309348315..ba76637f0 100644 --- a/entc/integration/edgefield/ent/metadata/where.go +++ b/entc/integration/edgefield/ent/metadata/where.go @@ -216,7 +216,6 @@ func HasUser() predicate.Metadata { return predicate.Metadata(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -244,7 +243,6 @@ func HasChildren() predicate.Metadata { return predicate.Metadata(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) @@ -272,7 +270,6 @@ func HasParent() predicate.Metadata { return predicate.Metadata(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/node/where.go b/entc/integration/edgefield/ent/node/where.go index e2a623dbb..8d09daa3f 100644 --- a/entc/integration/edgefield/ent/node/where.go +++ b/entc/integration/edgefield/ent/node/where.go @@ -216,7 +216,6 @@ func HasPrev() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PrevTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, PrevTable, PrevColumn), ) sqlgraph.HasNeighbors(s, step) @@ -244,7 +243,6 @@ func HasNext() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(NextTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, NextTable, NextColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/pet/where.go b/entc/integration/edgefield/ent/pet/where.go index a8b5d0c66..72035c8c3 100644 --- a/entc/integration/edgefield/ent/pet/where.go +++ b/entc/integration/edgefield/ent/pet/where.go @@ -145,7 +145,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/post/where.go b/entc/integration/edgefield/ent/post/where.go index 74d91238d..70f7499b3 100644 --- a/entc/integration/edgefield/ent/post/where.go +++ b/entc/integration/edgefield/ent/post/where.go @@ -251,7 +251,6 @@ func HasAuthor() predicate.Post { return predicate.Post(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(AuthorTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, AuthorTable, AuthorColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/rental/where.go b/entc/integration/edgefield/ent/rental/where.go index e5c7cf3c5..c9b3e5260 100644 --- a/entc/integration/edgefield/ent/rental/where.go +++ b/entc/integration/edgefield/ent/rental/where.go @@ -248,7 +248,6 @@ func HasUser() predicate.Rental { return predicate.Rental(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -276,7 +275,6 @@ func HasCar() predicate.Rental { return predicate.Rental(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CarTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, CarTable, CarColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgefield/ent/user/where.go b/entc/integration/edgefield/ent/user/where.go index 4eca59cd5..92538e312 100644 --- a/entc/integration/edgefield/ent/user/where.go +++ b/entc/integration/edgefield/ent/user/where.go @@ -202,7 +202,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -230,7 +229,6 @@ func HasParent() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -258,7 +256,6 @@ func HasChildren() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) @@ -286,7 +283,6 @@ func HasSpouse() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SpouseTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, SpouseTable, SpouseColumn), ) sqlgraph.HasNeighbors(s, step) @@ -314,7 +310,6 @@ func HasCard() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CardTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, CardTable, CardColumn), ) sqlgraph.HasNeighbors(s, step) @@ -342,7 +337,6 @@ func HasMetadata() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(MetadataTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, MetadataTable, MetadataColumn), ) sqlgraph.HasNeighbors(s, step) @@ -370,7 +364,6 @@ func HasInfo() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(InfoTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, InfoTable, InfoColumn), ) sqlgraph.HasNeighbors(s, step) @@ -398,7 +391,6 @@ func HasRentals() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RentalsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, RentalsTable, RentalsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/friendship/where.go b/entc/integration/edgeschema/ent/friendship/where.go index 98f8b6762..f4340d61b 100644 --- a/entc/integration/edgeschema/ent/friendship/where.go +++ b/entc/integration/edgeschema/ent/friendship/where.go @@ -318,7 +318,6 @@ func HasUser() predicate.Friendship { return predicate.Friendship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -346,7 +345,6 @@ func HasFriend() predicate.Friendship { return predicate.Friendship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, FriendTable, FriendColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/group/where.go b/entc/integration/edgeschema/ent/group/where.go index 206165a84..e464ec5d2 100644 --- a/entc/integration/edgeschema/ent/group/where.go +++ b/entc/integration/edgeschema/ent/group/where.go @@ -194,7 +194,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasTags() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TagsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, TagsTable, TagsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -250,7 +248,6 @@ func HasJoinedUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(JoinedUsersTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, JoinedUsersTable, JoinedUsersColumn), ) sqlgraph.HasNeighbors(s, step) @@ -278,7 +275,6 @@ func HasGroupTags() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupTagsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, GroupTagsTable, GroupTagsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/grouptag/where.go b/entc/integration/edgeschema/ent/grouptag/where.go index a28b29efd..0c79a11b2 100644 --- a/entc/integration/edgeschema/ent/grouptag/where.go +++ b/entc/integration/edgeschema/ent/grouptag/where.go @@ -174,7 +174,6 @@ func HasTag() predicate.GroupTag { return predicate.GroupTag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TagTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TagTable, TagColumn), ) sqlgraph.HasNeighbors(s, step) @@ -202,7 +201,6 @@ func HasGroup() predicate.GroupTag { return predicate.GroupTag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, GroupTable, GroupColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/relationship/where.go b/entc/integration/edgeschema/ent/relationship/where.go index 4505bf41a..c584889a5 100644 --- a/entc/integration/edgeschema/ent/relationship/where.go +++ b/entc/integration/edgeschema/ent/relationship/where.go @@ -231,7 +231,6 @@ func HasUser() predicate.Relationship { return predicate.Relationship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, UserColumn), - sqlgraph.To(UserInverseTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -259,7 +258,6 @@ func HasRelative() predicate.Relationship { return predicate.Relationship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, RelativeColumn), - sqlgraph.To(RelativeInverseTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2O, false, RelativeTable, RelativeColumn), ) sqlgraph.HasNeighbors(s, step) @@ -287,7 +285,6 @@ func HasInfo() predicate.Relationship { return predicate.Relationship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, InfoColumn), - sqlgraph.To(InfoInverseTable, RelationshipInfoFieldID), sqlgraph.Edge(sqlgraph.M2O, false, InfoTable, InfoColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/role/where.go b/entc/integration/edgeschema/ent/role/where.go index b47325504..6dafacb26 100644 --- a/entc/integration/edgeschema/ent/role/where.go +++ b/entc/integration/edgeschema/ent/role/where.go @@ -267,7 +267,6 @@ func HasUser() predicate.Role { return predicate.Role(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, UserTable, UserPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -295,7 +294,6 @@ func HasRolesUsers() predicate.Role { return predicate.Role(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RolesUsersTable, RolesUsersColumn), sqlgraph.Edge(sqlgraph.O2M, true, RolesUsersTable, RolesUsersColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/roleuser/where.go b/entc/integration/edgeschema/ent/roleuser/where.go index c77254502..35ad9ac11 100644 --- a/entc/integration/edgeschema/ent/roleuser/where.go +++ b/entc/integration/edgeschema/ent/roleuser/where.go @@ -176,7 +176,6 @@ func HasRole() predicate.RoleUser { return predicate.RoleUser(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, RoleColumn), - sqlgraph.To(RoleInverseTable, RoleFieldID), sqlgraph.Edge(sqlgraph.M2O, false, RoleTable, RoleColumn), ) sqlgraph.HasNeighbors(s, step) @@ -204,7 +203,6 @@ func HasUser() predicate.RoleUser { return predicate.RoleUser(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, UserColumn), - sqlgraph.To(UserInverseTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/tag/where.go b/entc/integration/edgeschema/ent/tag/where.go index 000fd10bd..9326efc05 100644 --- a/entc/integration/edgeschema/ent/tag/where.go +++ b/entc/integration/edgeschema/ent/tag/where.go @@ -194,7 +194,6 @@ func HasTweets() predicate.Tag { return predicate.Tag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, TweetsTable, TweetsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasGroups() predicate.Tag { return predicate.Tag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -250,7 +248,6 @@ func HasTweetTags() predicate.Tag { return predicate.Tag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetTagsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, TweetTagsTable, TweetTagsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -278,7 +275,6 @@ func HasGroupTags() predicate.Tag { return predicate.Tag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupTagsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, GroupTagsTable, GroupTagsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/tweet/where.go b/entc/integration/edgeschema/ent/tweet/where.go index 4e043819a..b96045336 100644 --- a/entc/integration/edgeschema/ent/tweet/where.go +++ b/entc/integration/edgeschema/ent/tweet/where.go @@ -194,7 +194,6 @@ func HasLikedUsers() predicate.Tweet { return predicate.Tweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(LikedUsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, LikedUsersTable, LikedUsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasUser() predicate.Tweet { return predicate.Tweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, UserTable, UserPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -250,7 +248,6 @@ func HasTags() predicate.Tweet { return predicate.Tweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TagsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, TagsTable, TagsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -278,7 +275,6 @@ func HasLikes() predicate.Tweet { return predicate.Tweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(LikesTable, LikesColumn), sqlgraph.Edge(sqlgraph.O2M, true, LikesTable, LikesColumn), ) sqlgraph.HasNeighbors(s, step) @@ -306,7 +302,6 @@ func HasTweetUser() predicate.Tweet { return predicate.Tweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetUserTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, TweetUserTable, TweetUserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -334,7 +329,6 @@ func HasTweetTags() predicate.Tweet { return predicate.Tweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetTagsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, TweetTagsTable, TweetTagsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/tweetlike/where.go b/entc/integration/edgeschema/ent/tweetlike/where.go index 2de385e7f..1dbeee635 100644 --- a/entc/integration/edgeschema/ent/tweetlike/where.go +++ b/entc/integration/edgeschema/ent/tweetlike/where.go @@ -176,7 +176,6 @@ func HasTweet() predicate.TweetLike { return predicate.TweetLike(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, TweetColumn), - sqlgraph.To(TweetInverseTable, TweetFieldID), sqlgraph.Edge(sqlgraph.M2O, false, TweetTable, TweetColumn), ) sqlgraph.HasNeighbors(s, step) @@ -204,7 +203,6 @@ func HasUser() predicate.TweetLike { return predicate.TweetLike(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, UserColumn), - sqlgraph.To(UserInverseTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/tweettag/where.go b/entc/integration/edgeschema/ent/tweettag/where.go index 13778d783..c96b04330 100644 --- a/entc/integration/edgeschema/ent/tweettag/where.go +++ b/entc/integration/edgeschema/ent/tweettag/where.go @@ -248,7 +248,6 @@ func HasTag() predicate.TweetTag { return predicate.TweetTag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TagTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TagTable, TagColumn), ) sqlgraph.HasNeighbors(s, step) @@ -276,7 +275,6 @@ func HasTweet() predicate.TweetTag { return predicate.TweetTag(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TweetTable, TweetColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/user/where.go b/entc/integration/edgeschema/ent/user/where.go index ca79f60f6..41a22410f 100644 --- a/entc/integration/edgeschema/ent/user/where.go +++ b/entc/integration/edgeschema/ent/user/where.go @@ -194,7 +194,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -250,7 +248,6 @@ func HasRelatives() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RelativesTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, RelativesTable, RelativesPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -278,7 +275,6 @@ func HasLikedTweets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(LikedTweetsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, LikedTweetsTable, LikedTweetsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -306,7 +302,6 @@ func HasTweets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, TweetsTable, TweetsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -334,7 +329,6 @@ func HasRoles() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RolesTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, RolesTable, RolesPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -362,7 +356,6 @@ func HasJoinedGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(JoinedGroupsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, JoinedGroupsTable, JoinedGroupsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -390,7 +383,6 @@ func HasFriendships() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendshipsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, FriendshipsTable, FriendshipsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -418,7 +410,6 @@ func HasRelationship() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RelationshipTable, RelationshipColumn), sqlgraph.Edge(sqlgraph.O2M, true, RelationshipTable, RelationshipColumn), ) sqlgraph.HasNeighbors(s, step) @@ -446,7 +437,6 @@ func HasLikes() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(LikesTable, LikesColumn), sqlgraph.Edge(sqlgraph.O2M, true, LikesTable, LikesColumn), ) sqlgraph.HasNeighbors(s, step) @@ -474,7 +464,6 @@ func HasUserTweets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTweetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, UserTweetsTable, UserTweetsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -502,7 +491,6 @@ func HasRolesUsers() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(RolesUsersTable, RolesUsersColumn), sqlgraph.Edge(sqlgraph.O2M, true, RolesUsersTable, RolesUsersColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/usergroup/where.go b/entc/integration/edgeschema/ent/usergroup/where.go index e77706bdf..6f201fe81 100644 --- a/entc/integration/edgeschema/ent/usergroup/where.go +++ b/entc/integration/edgeschema/ent/usergroup/where.go @@ -247,7 +247,6 @@ func HasUser() predicate.UserGroup { return predicate.UserGroup(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -275,7 +274,6 @@ func HasGroup() predicate.UserGroup { return predicate.UserGroup(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, GroupTable, GroupColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/edgeschema/ent/usertweet/where.go b/entc/integration/edgeschema/ent/usertweet/where.go index dae2fdcaf..2570f1fd5 100644 --- a/entc/integration/edgeschema/ent/usertweet/where.go +++ b/entc/integration/edgeschema/ent/usertweet/where.go @@ -247,7 +247,6 @@ func HasUser() predicate.UserTweet { return predicate.UserTweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) sqlgraph.HasNeighbors(s, step) @@ -275,7 +274,6 @@ func HasTweet() predicate.UserTweet { return predicate.UserTweet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TweetTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TweetTable, TweetColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/card/where.go b/entc/integration/ent/card/where.go index b92d93418..50a7ebdfb 100644 --- a/entc/integration/ent/card/where.go +++ b/entc/integration/ent/card/where.go @@ -529,7 +529,6 @@ func HasOwner() predicate.Card { return predicate.Card(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) @@ -557,7 +556,6 @@ func HasSpec() predicate.Card { return predicate.Card(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SpecTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, SpecTable, SpecPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/file/where.go b/entc/integration/ent/file/where.go index 6c0181d12..90ec58346 100644 --- a/entc/integration/ent/file/where.go +++ b/entc/integration/ent/file/where.go @@ -618,7 +618,6 @@ func HasOwner() predicate.File { return predicate.File(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) @@ -646,7 +645,6 @@ func HasType() predicate.File { return predicate.File(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TypeTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, TypeTable, TypeColumn), ) sqlgraph.HasNeighbors(s, step) @@ -674,7 +672,6 @@ func HasField() predicate.File { return predicate.File(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FieldTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, FieldTable, FieldColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/filetype/where.go b/entc/integration/ent/filetype/where.go index 55d6a7b41..b1c813fd3 100644 --- a/entc/integration/ent/filetype/where.go +++ b/entc/integration/ent/filetype/where.go @@ -266,7 +266,6 @@ func HasFiles() predicate.FileType { return predicate.FileType(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FilesTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/group/where.go b/entc/integration/ent/group/where.go index ce90ce637..8c5685891 100644 --- a/entc/integration/ent/group/where.go +++ b/entc/integration/ent/group/where.go @@ -493,7 +493,6 @@ func HasFiles() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FilesTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn), ) sqlgraph.HasNeighbors(s, step) @@ -521,7 +520,6 @@ func HasBlocked() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(BlockedTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, BlockedTable, BlockedColumn), ) sqlgraph.HasNeighbors(s, step) @@ -549,7 +547,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -577,7 +574,6 @@ func HasInfo() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(InfoTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, InfoTable, InfoColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/groupinfo/where.go b/entc/integration/ent/groupinfo/where.go index 2feac91c4..b837966dc 100644 --- a/entc/integration/ent/groupinfo/where.go +++ b/entc/integration/ent/groupinfo/where.go @@ -265,7 +265,6 @@ func HasGroups() predicate.GroupInfo { return predicate.GroupInfo(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, GroupsTable, GroupsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/node/where.go b/entc/integration/ent/node/where.go index f153dbd55..281776cb7 100644 --- a/entc/integration/ent/node/where.go +++ b/entc/integration/ent/node/where.go @@ -173,7 +173,6 @@ func HasPrev() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PrevTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, PrevTable, PrevColumn), ) sqlgraph.HasNeighbors(s, step) @@ -201,7 +200,6 @@ func HasNext() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(NextTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, NextTable, NextColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/pet/where.go b/entc/integration/ent/pet/where.go index 4734796ff..47253ccd1 100644 --- a/entc/integration/ent/pet/where.go +++ b/entc/integration/ent/pet/where.go @@ -492,7 +492,6 @@ func HasTeam() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TeamTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, TeamTable, TeamColumn), ) sqlgraph.HasNeighbors(s, step) @@ -520,7 +519,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/spec/where.go b/entc/integration/ent/spec/where.go index 670a5beab..04e1834bf 100644 --- a/entc/integration/ent/spec/where.go +++ b/entc/integration/ent/spec/where.go @@ -88,7 +88,6 @@ func HasCard() predicate.Spec { return predicate.Spec(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CardTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, CardTable, CardPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/ent/user/where.go b/entc/integration/ent/user/where.go index abea41c59..4a78533a2 100644 --- a/entc/integration/ent/user/where.go +++ b/entc/integration/ent/user/where.go @@ -1128,7 +1128,6 @@ func HasCard() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CardTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, CardTable, CardColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1156,7 +1155,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1184,7 +1182,6 @@ func HasFiles() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FilesTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1212,7 +1209,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -1240,7 +1236,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -1268,7 +1263,6 @@ func HasFollowers() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FollowersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, FollowersTable, FollowersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -1296,7 +1290,6 @@ func HasFollowing() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FollowingTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FollowingTable, FollowingPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -1324,7 +1317,6 @@ func HasTeam() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TeamTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, TeamTable, TeamColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1352,7 +1344,6 @@ func HasSpouse() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SpouseTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, SpouseTable, SpouseColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1380,7 +1371,6 @@ func HasChildren() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1408,7 +1398,6 @@ func HasParent() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/hooks/ent/card/where.go b/entc/integration/hooks/ent/card/where.go index ac0c98ef2..9061acb3f 100644 --- a/entc/integration/hooks/ent/card/where.go +++ b/entc/integration/hooks/ent/card/where.go @@ -493,7 +493,6 @@ func HasOwner() predicate.Card { return predicate.Card(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/hooks/ent/user/where.go b/entc/integration/hooks/ent/user/where.go index c13bb5958..63f88192a 100644 --- a/entc/integration/hooks/ent/user/where.go +++ b/entc/integration/hooks/ent/user/where.go @@ -470,7 +470,6 @@ func HasCards() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CardsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, CardsTable, CardsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -498,7 +497,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -526,7 +524,6 @@ func HasBestFriend() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(BestFriendTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, BestFriendTable, BestFriendColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/idtype/ent/user/where.go b/entc/integration/idtype/ent/user/where.go index a94113f27..eaae9b361 100644 --- a/entc/integration/idtype/ent/user/where.go +++ b/entc/integration/idtype/ent/user/where.go @@ -194,7 +194,6 @@ func HasSpouse() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SpouseTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, SpouseTable, SpouseColumn), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasFollowers() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FollowersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, FollowersTable, FollowersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -250,7 +248,6 @@ func HasFollowing() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FollowingTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FollowingTable, FollowingPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/migrate/entv1/car/where.go b/entc/integration/migrate/entv1/car/where.go index 3b5f1c1d4..20612e3bf 100644 --- a/entc/integration/migrate/entv1/car/where.go +++ b/entc/integration/migrate/entv1/car/where.go @@ -88,7 +88,6 @@ func HasOwner() predicate.Car { return predicate.Car(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, UserFieldID), sqlgraph.Edge(sqlgraph.O2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/migrate/entv1/user/where.go b/entc/integration/migrate/entv1/user/where.go index 2673549c1..7a8769ea3 100644 --- a/entc/integration/migrate/entv1/user/where.go +++ b/entc/integration/migrate/entv1/user/where.go @@ -1332,7 +1332,6 @@ func HasParent() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1360,7 +1359,6 @@ func HasChildren() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1388,7 +1386,6 @@ func HasSpouse() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SpouseTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, SpouseTable, SpouseColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1416,7 +1413,6 @@ func HasCar() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CarTable, CarFieldID), sqlgraph.Edge(sqlgraph.O2O, false, CarTable, CarColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/migrate/entv2/blog/where.go b/entc/integration/migrate/entv2/blog/where.go index 5ffe94d79..c174efce8 100644 --- a/entc/integration/migrate/entv2/blog/where.go +++ b/entc/integration/migrate/entv2/blog/where.go @@ -88,7 +88,6 @@ func HasAdmins() predicate.Blog { return predicate.Blog(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(AdminsTable, UserFieldID), sqlgraph.Edge(sqlgraph.O2M, false, AdminsTable, AdminsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/migrate/entv2/car/where.go b/entc/integration/migrate/entv2/car/where.go index d8cf76250..dd9260edf 100644 --- a/entc/integration/migrate/entv2/car/where.go +++ b/entc/integration/migrate/entv2/car/where.go @@ -208,7 +208,6 @@ func HasOwner() predicate.Car { return predicate.Car(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, UserFieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/migrate/entv2/pet/where.go b/entc/integration/migrate/entv2/pet/where.go index 892f59dc2..077e577a0 100644 --- a/entc/integration/migrate/entv2/pet/where.go +++ b/entc/integration/migrate/entv2/pet/where.go @@ -208,7 +208,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, UserFieldID), sqlgraph.Edge(sqlgraph.O2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/migrate/entv2/user/where.go b/entc/integration/migrate/entv2/user/where.go index 5c1ebab87..319d03010 100644 --- a/entc/integration/migrate/entv2/user/where.go +++ b/entc/integration/migrate/entv2/user/where.go @@ -1915,7 +1915,6 @@ func HasCar() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CarTable, CarFieldID), sqlgraph.Edge(sqlgraph.O2M, false, CarTable, CarColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1943,7 +1942,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, PetFieldID), sqlgraph.Edge(sqlgraph.O2O, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -1971,7 +1969,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/multischema/ent/friendship/where.go b/entc/integration/multischema/ent/friendship/where.go index bdf1c5851..393f00e19 100644 --- a/entc/integration/multischema/ent/friendship/where.go +++ b/entc/integration/multischema/ent/friendship/where.go @@ -319,7 +319,6 @@ func HasUser() predicate.Friendship { return predicate.Friendship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UserTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, UserTable, UserColumn), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) @@ -353,7 +352,6 @@ func HasFriend() predicate.Friendship { return predicate.Friendship(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, FriendTable, FriendColumn), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) diff --git a/entc/integration/multischema/ent/group/where.go b/entc/integration/multischema/ent/group/where.go index 2a6f079ce..e99dd8538 100644 --- a/entc/integration/multischema/ent/group/where.go +++ b/entc/integration/multischema/ent/group/where.go @@ -195,7 +195,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, UsersTable, UsersPrimaryKey...), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) diff --git a/entc/integration/multischema/ent/pet/where.go b/entc/integration/multischema/ent/pet/where.go index 3700d80b4..c06cd9153 100644 --- a/entc/integration/multischema/ent/pet/where.go +++ b/entc/integration/multischema/ent/pet/where.go @@ -252,7 +252,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) diff --git a/entc/integration/multischema/ent/user/where.go b/entc/integration/multischema/ent/user/where.go index 6dcd17e7f..f84ccd699 100644 --- a/entc/integration/multischema/ent/user/where.go +++ b/entc/integration/multischema/ent/user/where.go @@ -195,7 +195,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) @@ -229,7 +228,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, GroupsTable, GroupsPrimaryKey...), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) @@ -263,7 +261,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) @@ -297,7 +294,6 @@ func HasFriendships() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendshipsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, FriendshipsTable, FriendshipsColumn), ) schemaConfig := internal.SchemaConfigFromContext(s.Context()) diff --git a/entc/integration/privacy/ent/task/where.go b/entc/integration/privacy/ent/task/where.go index 084b603b6..f74885ed6 100644 --- a/entc/integration/privacy/ent/task/where.go +++ b/entc/integration/privacy/ent/task/where.go @@ -436,7 +436,6 @@ func HasTeams() predicate.Task { return predicate.Task(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TeamsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, TeamsTable, TeamsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -464,7 +463,6 @@ func HasOwner() predicate.Task { return predicate.Task(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/privacy/ent/team/where.go b/entc/integration/privacy/ent/team/where.go index a41b02c65..25b8e72f3 100644 --- a/entc/integration/privacy/ent/team/where.go +++ b/entc/integration/privacy/ent/team/where.go @@ -194,7 +194,6 @@ func HasTasks() predicate.Team { return predicate.Team(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TasksTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, TasksTable, TasksPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasUsers() predicate.Team { return predicate.Team(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/privacy/ent/user/where.go b/entc/integration/privacy/ent/user/where.go index 758e7c242..748a5554e 100644 --- a/entc/integration/privacy/ent/user/where.go +++ b/entc/integration/privacy/ent/user/where.go @@ -279,7 +279,6 @@ func HasTeams() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TeamsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, TeamsTable, TeamsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -307,7 +306,6 @@ func HasTasks() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TasksTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, TasksTable, TasksColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/template/ent/pet/where.go b/entc/integration/template/ent/pet/where.go index b84332625..3664b5389 100644 --- a/entc/integration/template/ent/pet/where.go +++ b/entc/integration/template/ent/pet/where.go @@ -246,7 +246,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/entc/integration/template/ent/user/where.go b/entc/integration/template/ent/user/where.go index 2d1d552dd..2f1973b34 100644 --- a/entc/integration/template/ent/user/where.go +++ b/entc/integration/template/ent/user/where.go @@ -194,7 +194,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/edgeindex/ent/city/where.go b/examples/edgeindex/ent/city/where.go index 92643caa5..188cbe965 100644 --- a/examples/edgeindex/ent/city/where.go +++ b/examples/edgeindex/ent/city/where.go @@ -194,7 +194,6 @@ func HasStreets() predicate.City { return predicate.City(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(StreetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, StreetsTable, StreetsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/edgeindex/ent/street/where.go b/examples/edgeindex/ent/street/where.go index 6f3ef4ca8..b7fec31b5 100644 --- a/examples/edgeindex/ent/street/where.go +++ b/examples/edgeindex/ent/street/where.go @@ -194,7 +194,6 @@ func HasCity() predicate.Street { return predicate.Street(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CityTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, CityTable, CityColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/fs/ent/file/where.go b/examples/fs/ent/file/where.go index 01653c251..e614382d4 100644 --- a/examples/fs/ent/file/where.go +++ b/examples/fs/ent/file/where.go @@ -272,7 +272,6 @@ func HasParent() predicate.File { return predicate.File(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -300,7 +299,6 @@ func HasChildren() predicate.File { return predicate.File(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/jsonencode/ent/pet/where.go b/examples/jsonencode/ent/pet/where.go index 5b160dfa3..fc17b91dc 100644 --- a/examples/jsonencode/ent/pet/where.go +++ b/examples/jsonencode/ent/pet/where.go @@ -308,7 +308,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/jsonencode/ent/user/where.go b/examples/jsonencode/ent/user/where.go index 1a6b72edb..cf0790d82 100644 --- a/examples/jsonencode/ent/user/where.go +++ b/examples/jsonencode/ent/user/where.go @@ -265,7 +265,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/m2m2types/ent/group/where.go b/examples/m2m2types/ent/group/where.go index 522c5b740..1430dc088 100644 --- a/examples/m2m2types/ent/group/where.go +++ b/examples/m2m2types/ent/group/where.go @@ -194,7 +194,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/m2m2types/ent/user/where.go b/examples/m2m2types/ent/user/where.go index 68f7ff60f..aa6a79e62 100644 --- a/examples/m2m2types/ent/user/where.go +++ b/examples/m2m2types/ent/user/where.go @@ -265,7 +265,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/m2mbidi/ent/user/where.go b/examples/m2mbidi/ent/user/where.go index 137116ab7..8dbeabd94 100644 --- a/examples/m2mbidi/ent/user/where.go +++ b/examples/m2mbidi/ent/user/where.go @@ -265,7 +265,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/m2mrecur/ent/user/where.go b/examples/m2mrecur/ent/user/where.go index e1bd7142b..a58fc01a4 100644 --- a/examples/m2mrecur/ent/user/where.go +++ b/examples/m2mrecur/ent/user/where.go @@ -265,7 +265,6 @@ func HasFollowers() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FollowersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, FollowersTable, FollowersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -293,7 +292,6 @@ func HasFollowing() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FollowingTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FollowingTable, FollowingPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2m2types/ent/pet/where.go b/examples/o2m2types/ent/pet/where.go index a9024cecc..79ba1df1d 100644 --- a/examples/o2m2types/ent/pet/where.go +++ b/examples/o2m2types/ent/pet/where.go @@ -194,7 +194,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2m2types/ent/user/where.go b/examples/o2m2types/ent/user/where.go index 66bf1fbd8..5ea256d4a 100644 --- a/examples/o2m2types/ent/user/where.go +++ b/examples/o2m2types/ent/user/where.go @@ -265,7 +265,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2mrecur/ent/node/where.go b/examples/o2mrecur/ent/node/where.go index 94e5fa3ed..79cb9fbc4 100644 --- a/examples/o2mrecur/ent/node/where.go +++ b/examples/o2mrecur/ent/node/where.go @@ -159,7 +159,6 @@ func HasParent() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ParentTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn), ) sqlgraph.HasNeighbors(s, step) @@ -187,7 +186,6 @@ func HasChildren() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ChildrenTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2o2types/ent/card/where.go b/examples/o2o2types/ent/card/where.go index e18b65ab1..5bc10ef1a 100644 --- a/examples/o2o2types/ent/card/where.go +++ b/examples/o2o2types/ent/card/where.go @@ -267,7 +267,6 @@ func HasOwner() predicate.Card { return predicate.Card(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2o2types/ent/user/where.go b/examples/o2o2types/ent/user/where.go index abd7d7ed6..3b0dc647b 100644 --- a/examples/o2o2types/ent/user/where.go +++ b/examples/o2o2types/ent/user/where.go @@ -265,7 +265,6 @@ func HasCard() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CardTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, CardTable, CardColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2obidi/ent/user/where.go b/examples/o2obidi/ent/user/where.go index 7611eba01..f42ef7782 100644 --- a/examples/o2obidi/ent/user/where.go +++ b/examples/o2obidi/ent/user/where.go @@ -265,7 +265,6 @@ func HasSpouse() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(SpouseTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, SpouseTable, SpouseColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/o2orecur/ent/node/where.go b/examples/o2orecur/ent/node/where.go index fa689bc0f..803f140c5 100644 --- a/examples/o2orecur/ent/node/where.go +++ b/examples/o2orecur/ent/node/where.go @@ -159,7 +159,6 @@ func HasPrev() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PrevTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, PrevTable, PrevColumn), ) sqlgraph.HasNeighbors(s, step) @@ -187,7 +186,6 @@ func HasNext() predicate.Node { return predicate.Node(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(NextTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, NextTable, NextColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/privacytenant/ent/group/where.go b/examples/privacytenant/ent/group/where.go index 06e44837e..d706440de 100644 --- a/examples/privacytenant/ent/group/where.go +++ b/examples/privacytenant/ent/group/where.go @@ -237,7 +237,6 @@ func HasTenant() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TenantTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TenantTable, TenantColumn), ) sqlgraph.HasNeighbors(s, step) @@ -265,7 +264,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/privacytenant/ent/user/where.go b/examples/privacytenant/ent/user/where.go index 20ec9c9af..402cd64f3 100644 --- a/examples/privacytenant/ent/user/where.go +++ b/examples/privacytenant/ent/user/where.go @@ -251,7 +251,6 @@ func HasTenant() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(TenantTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, TenantTable, TenantColumn), ) sqlgraph.HasNeighbors(s, step) @@ -279,7 +278,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/start/ent/car/where.go b/examples/start/ent/car/where.go index e885efde6..6be9412c2 100644 --- a/examples/start/ent/car/where.go +++ b/examples/start/ent/car/where.go @@ -267,7 +267,6 @@ func HasOwner() predicate.Car { return predicate.Car(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/start/ent/group/where.go b/examples/start/ent/group/where.go index 72b956571..2060a4b42 100644 --- a/examples/start/ent/group/where.go +++ b/examples/start/ent/group/where.go @@ -194,7 +194,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/start/ent/user/where.go b/examples/start/ent/user/where.go index 008fd9cc7..8075a64c9 100644 --- a/examples/start/ent/user/where.go +++ b/examples/start/ent/user/where.go @@ -265,7 +265,6 @@ func HasCars() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(CarsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, CarsTable, CarsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -293,7 +292,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/traversal/ent/group/where.go b/examples/traversal/ent/group/where.go index 551d459ec..1fc20ba80 100644 --- a/examples/traversal/ent/group/where.go +++ b/examples/traversal/ent/group/where.go @@ -194,7 +194,6 @@ func HasUsers() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(UsersTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, UsersTable, UsersPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasAdmin() predicate.Group { return predicate.Group(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(AdminTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, false, AdminTable, AdminColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/traversal/ent/pet/where.go b/examples/traversal/ent/pet/where.go index ed7975832..a5b89036b 100644 --- a/examples/traversal/ent/pet/where.go +++ b/examples/traversal/ent/pet/where.go @@ -194,7 +194,6 @@ func HasFriends() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -222,7 +221,6 @@ func HasOwner() predicate.Pet { return predicate.Pet(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(OwnerTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) sqlgraph.HasNeighbors(s, step) diff --git a/examples/traversal/ent/user/where.go b/examples/traversal/ent/user/where.go index a80f1ed91..a62703b3b 100644 --- a/examples/traversal/ent/user/where.go +++ b/examples/traversal/ent/user/where.go @@ -265,7 +265,6 @@ func HasPets() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(PetsTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, PetsTable, PetsColumn), ) sqlgraph.HasNeighbors(s, step) @@ -293,7 +292,6 @@ func HasFriends() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(FriendsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, FriendsTable, FriendsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -321,7 +319,6 @@ func HasGroups() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(GroupsTable, FieldID), sqlgraph.Edge(sqlgraph.M2M, true, GroupsTable, GroupsPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) @@ -349,7 +346,6 @@ func HasManage() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), - sqlgraph.To(ManageTable, FieldID), sqlgraph.Edge(sqlgraph.O2M, true, ManageTable, ManageColumn), ) sqlgraph.HasNeighbors(s, step)