entc/gen: check edge-field on mutation-cleared calls for edges

Fixed #1445
This commit is contained in:
Ariel Mashraki
2021-04-09 18:02:54 +03:00
committed by Ariel Mashraki
parent 106dd53d23
commit 8d7bb7fad6
29 changed files with 178 additions and 160 deletions

View File

@@ -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
}