mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +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
@@ -179,7 +179,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
|
||||
}
|
||||
@@ -552,7 +552,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
|
||||
}
|
||||
@@ -917,7 +917,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
|
||||
}
|
||||
@@ -970,7 +970,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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user