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

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