mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
entc/gen: check edge-field on mutation-cleared calls for edges
Fixed #1445
This commit is contained in:
committed by
Ariel Mashraki
parent
106dd53d23
commit
8d7bb7fad6
@@ -177,7 +177,7 @@ func (m *CityMutation) ClearStreets() {
|
||||
m.clearedstreets = true
|
||||
}
|
||||
|
||||
// StreetsCleared returns if the "streets" edge to the Street entity was cleared.
|
||||
// StreetsCleared reports if the "streets" edge to the Street entity was cleared.
|
||||
func (m *CityMutation) StreetsCleared() bool {
|
||||
return m.clearedstreets
|
||||
}
|
||||
@@ -550,7 +550,7 @@ func (m *StreetMutation) ClearCity() {
|
||||
m.clearedcity = true
|
||||
}
|
||||
|
||||
// CityCleared returns if the "city" edge to the City entity was cleared.
|
||||
// CityCleared reports if the "city" edge to the City entity was cleared.
|
||||
func (m *StreetMutation) CityCleared() bool {
|
||||
return m.clearedcity
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ func (m *GroupMutation) ClearUsers() {
|
||||
m.clearedusers = true
|
||||
}
|
||||
|
||||
// UsersCleared returns if the "users" edge to the User entity was cleared.
|
||||
// UsersCleared reports if the "users" edge to the User entity was cleared.
|
||||
func (m *GroupMutation) UsersCleared() bool {
|
||||
return m.clearedusers
|
||||
}
|
||||
@@ -614,7 +614,7 @@ func (m *UserMutation) ClearGroups() {
|
||||
m.clearedgroups = true
|
||||
}
|
||||
|
||||
// GroupsCleared returns if the "groups" edge to the Group entity was cleared.
|
||||
// GroupsCleared reports if the "groups" edge to the Group entity was cleared.
|
||||
func (m *UserMutation) GroupsCleared() bool {
|
||||
return m.clearedgroups
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ func (m *UserMutation) ClearFriends() {
|
||||
m.clearedfriends = true
|
||||
}
|
||||
|
||||
// FriendsCleared returns if the "friends" edge to the User entity was cleared.
|
||||
// FriendsCleared reports if the "friends" edge to the User entity was cleared.
|
||||
func (m *UserMutation) FriendsCleared() bool {
|
||||
return m.clearedfriends
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ func (m *UserMutation) ClearFollowers() {
|
||||
m.clearedfollowers = true
|
||||
}
|
||||
|
||||
// FollowersCleared returns if the "followers" edge to the User entity was cleared.
|
||||
// FollowersCleared reports if the "followers" edge to the User entity was cleared.
|
||||
func (m *UserMutation) FollowersCleared() bool {
|
||||
return m.clearedfollowers
|
||||
}
|
||||
@@ -289,7 +289,7 @@ func (m *UserMutation) ClearFollowing() {
|
||||
m.clearedfollowing = true
|
||||
}
|
||||
|
||||
// FollowingCleared returns if the "following" edge to the User entity was cleared.
|
||||
// FollowingCleared reports if the "following" edge to the User entity was cleared.
|
||||
func (m *UserMutation) FollowingCleared() bool {
|
||||
return m.clearedfollowing
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ func (m *PetMutation) ClearOwner() {
|
||||
m.clearedowner = true
|
||||
}
|
||||
|
||||
// OwnerCleared returns if the "owner" edge to the User entity was cleared.
|
||||
// OwnerCleared reports if the "owner" edge to the User entity was cleared.
|
||||
func (m *PetMutation) OwnerCleared() bool {
|
||||
return m.clearedowner
|
||||
}
|
||||
@@ -591,7 +591,7 @@ func (m *UserMutation) ClearPets() {
|
||||
m.clearedpets = true
|
||||
}
|
||||
|
||||
// PetsCleared returns if the "pets" edge to the Pet entity was cleared.
|
||||
// PetsCleared reports if the "pets" edge to the Pet entity was cleared.
|
||||
func (m *UserMutation) PetsCleared() bool {
|
||||
return m.clearedpets
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ func (m *NodeMutation) ClearParent() {
|
||||
m.clearedparent = true
|
||||
}
|
||||
|
||||
// ParentCleared returns if the "parent" edge to the Node entity was cleared.
|
||||
// ParentCleared reports if the "parent" edge to the Node entity was cleared.
|
||||
func (m *NodeMutation) ParentCleared() bool {
|
||||
return m.clearedparent
|
||||
}
|
||||
@@ -237,7 +237,7 @@ func (m *NodeMutation) ClearChildren() {
|
||||
m.clearedchildren = true
|
||||
}
|
||||
|
||||
// ChildrenCleared returns if the "children" edge to the Node entity was cleared.
|
||||
// ChildrenCleared reports if the "children" edge to the Node entity was cleared.
|
||||
func (m *NodeMutation) ChildrenCleared() bool {
|
||||
return m.clearedchildren
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ func (m *CardMutation) ClearOwner() {
|
||||
m.clearedowner = true
|
||||
}
|
||||
|
||||
// OwnerCleared returns if the "owner" edge to the User entity was cleared.
|
||||
// OwnerCleared reports if the "owner" edge to the User entity was cleared.
|
||||
func (m *CardMutation) OwnerCleared() bool {
|
||||
return m.clearedowner
|
||||
}
|
||||
@@ -640,7 +640,7 @@ func (m *UserMutation) ClearCard() {
|
||||
m.clearedcard = true
|
||||
}
|
||||
|
||||
// CardCleared returns if the "card" edge to the Card entity was cleared.
|
||||
// CardCleared reports if the "card" edge to the Card entity was cleared.
|
||||
func (m *UserMutation) CardCleared() bool {
|
||||
return m.clearedcard
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ func (m *UserMutation) ClearSpouse() {
|
||||
m.clearedspouse = true
|
||||
}
|
||||
|
||||
// SpouseCleared returns if the "spouse" edge to the User entity was cleared.
|
||||
// SpouseCleared reports if the "spouse" edge to the User entity was cleared.
|
||||
func (m *UserMutation) SpouseCleared() bool {
|
||||
return m.clearedspouse
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ func (m *NodeMutation) ClearPrev() {
|
||||
m.clearedprev = true
|
||||
}
|
||||
|
||||
// PrevCleared returns if the "prev" edge to the Node entity was cleared.
|
||||
// PrevCleared reports if the "prev" edge to the Node entity was cleared.
|
||||
func (m *NodeMutation) PrevCleared() bool {
|
||||
return m.clearedprev
|
||||
}
|
||||
@@ -231,7 +231,7 @@ func (m *NodeMutation) ClearNext() {
|
||||
m.clearednext = true
|
||||
}
|
||||
|
||||
// NextCleared returns if the "next" edge to the Node entity was cleared.
|
||||
// NextCleared reports if the "next" edge to the Node entity was cleared.
|
||||
func (m *NodeMutation) NextCleared() bool {
|
||||
return m.clearednext
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ func (m *GroupMutation) ClearTenant() {
|
||||
m.clearedtenant = true
|
||||
}
|
||||
|
||||
// TenantCleared returns if the "tenant" edge to the Tenant entity was cleared.
|
||||
// TenantCleared reports if the "tenant" edge to the Tenant entity was cleared.
|
||||
func (m *GroupMutation) TenantCleared() bool {
|
||||
return m.clearedtenant
|
||||
}
|
||||
@@ -220,7 +220,7 @@ func (m *GroupMutation) ClearUsers() {
|
||||
m.clearedusers = true
|
||||
}
|
||||
|
||||
// UsersCleared returns if the "users" edge to the User entity was cleared.
|
||||
// UsersCleared reports if the "users" edge to the User entity was cleared.
|
||||
func (m *GroupMutation) UsersCleared() bool {
|
||||
return m.clearedusers
|
||||
}
|
||||
@@ -951,7 +951,7 @@ func (m *UserMutation) ClearTenant() {
|
||||
m.clearedtenant = true
|
||||
}
|
||||
|
||||
// TenantCleared returns if the "tenant" edge to the Tenant entity was cleared.
|
||||
// TenantCleared reports if the "tenant" edge to the Tenant entity was cleared.
|
||||
func (m *UserMutation) TenantCleared() bool {
|
||||
return m.clearedtenant
|
||||
}
|
||||
@@ -995,7 +995,7 @@ func (m *UserMutation) ClearGroups() {
|
||||
m.clearedgroups = true
|
||||
}
|
||||
|
||||
// GroupsCleared returns if the "groups" edge to the Group entity was cleared.
|
||||
// GroupsCleared reports if the "groups" edge to the Group entity was cleared.
|
||||
func (m *UserMutation) GroupsCleared() bool {
|
||||
return m.clearedgroups
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ func (m *CarMutation) ClearOwner() {
|
||||
m.clearedowner = true
|
||||
}
|
||||
|
||||
// OwnerCleared returns if the "owner" edge to the User entity was cleared.
|
||||
// OwnerCleared reports if the "owner" edge to the User entity was cleared.
|
||||
func (m *CarMutation) OwnerCleared() bool {
|
||||
return m.clearedowner
|
||||
}
|
||||
@@ -590,7 +590,7 @@ func (m *GroupMutation) ClearUsers() {
|
||||
m.clearedusers = true
|
||||
}
|
||||
|
||||
// UsersCleared returns if the "users" edge to the User entity was cleared.
|
||||
// UsersCleared reports if the "users" edge to the User entity was cleared.
|
||||
func (m *GroupMutation) UsersCleared() bool {
|
||||
return m.clearedusers
|
||||
}
|
||||
@@ -1030,7 +1030,7 @@ func (m *UserMutation) ClearCars() {
|
||||
m.clearedcars = true
|
||||
}
|
||||
|
||||
// CarsCleared returns if the "cars" edge to the Car entity was cleared.
|
||||
// CarsCleared reports if the "cars" edge to the Car entity was cleared.
|
||||
func (m *UserMutation) CarsCleared() bool {
|
||||
return m.clearedcars
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ func (m *UserMutation) ClearGroups() {
|
||||
m.clearedgroups = true
|
||||
}
|
||||
|
||||
// GroupsCleared returns if the "groups" edge to the Group entity was cleared.
|
||||
// GroupsCleared reports if the "groups" edge to the Group entity was cleared.
|
||||
func (m *UserMutation) GroupsCleared() bool {
|
||||
return m.clearedgroups
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ func (m *GroupMutation) ClearUsers() {
|
||||
m.clearedusers = true
|
||||
}
|
||||
|
||||
// UsersCleared returns if the "users" edge to the User entity was cleared.
|
||||
// UsersCleared reports if the "users" edge to the User entity was cleared.
|
||||
func (m *GroupMutation) UsersCleared() bool {
|
||||
return m.clearedusers
|
||||
}
|
||||
@@ -229,7 +229,7 @@ func (m *GroupMutation) ClearAdmin() {
|
||||
m.clearedadmin = true
|
||||
}
|
||||
|
||||
// AdminCleared returns if the "admin" edge to the User entity was cleared.
|
||||
// AdminCleared reports if the "admin" edge to the User entity was cleared.
|
||||
func (m *GroupMutation) AdminCleared() bool {
|
||||
return m.clearedadmin
|
||||
}
|
||||
@@ -619,7 +619,7 @@ func (m *PetMutation) ClearFriends() {
|
||||
m.clearedfriends = true
|
||||
}
|
||||
|
||||
// FriendsCleared returns if the "friends" edge to the Pet entity was cleared.
|
||||
// FriendsCleared reports if the "friends" edge to the Pet entity was cleared.
|
||||
func (m *PetMutation) FriendsCleared() bool {
|
||||
return m.clearedfriends
|
||||
}
|
||||
@@ -667,7 +667,7 @@ func (m *PetMutation) ClearOwner() {
|
||||
m.clearedowner = true
|
||||
}
|
||||
|
||||
// OwnerCleared returns if the "owner" edge to the User entity was cleared.
|
||||
// OwnerCleared reports if the "owner" edge to the User entity was cleared.
|
||||
func (m *PetMutation) OwnerCleared() bool {
|
||||
return m.clearedowner
|
||||
}
|
||||
@@ -1122,7 +1122,7 @@ func (m *UserMutation) ClearPets() {
|
||||
m.clearedpets = true
|
||||
}
|
||||
|
||||
// PetsCleared returns if the "pets" edge to the Pet entity was cleared.
|
||||
// PetsCleared reports if the "pets" edge to the Pet entity was cleared.
|
||||
func (m *UserMutation) PetsCleared() bool {
|
||||
return m.clearedpets
|
||||
}
|
||||
@@ -1175,7 +1175,7 @@ func (m *UserMutation) ClearFriends() {
|
||||
m.clearedfriends = true
|
||||
}
|
||||
|
||||
// FriendsCleared returns if the "friends" edge to the User entity was cleared.
|
||||
// FriendsCleared reports if the "friends" edge to the User entity was cleared.
|
||||
func (m *UserMutation) FriendsCleared() bool {
|
||||
return m.clearedfriends
|
||||
}
|
||||
@@ -1228,7 +1228,7 @@ func (m *UserMutation) ClearGroups() {
|
||||
m.clearedgroups = true
|
||||
}
|
||||
|
||||
// GroupsCleared returns if the "groups" edge to the Group entity was cleared.
|
||||
// GroupsCleared reports if the "groups" edge to the Group entity was cleared.
|
||||
func (m *UserMutation) GroupsCleared() bool {
|
||||
return m.clearedgroups
|
||||
}
|
||||
@@ -1281,7 +1281,7 @@ func (m *UserMutation) ClearManage() {
|
||||
m.clearedmanage = true
|
||||
}
|
||||
|
||||
// ManageCleared returns if the "manage" edge to the Group entity was cleared.
|
||||
// ManageCleared reports if the "manage" edge to the Group entity was cleared.
|
||||
func (m *UserMutation) ManageCleared() bool {
|
||||
return m.clearedmanage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user