entc/gen: fix method conflicts in mutation builders (#479)

Fixed #475
This commit is contained in:
Ariel Mashraki
2020-05-08 21:02:21 +03:00
committed by GitHub
parent 9242549f4a
commit 08289b3570
43 changed files with 1025 additions and 310 deletions

View File

@@ -95,7 +95,7 @@ func (m *CityMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *CityMutation) ResetName() {
m.name = nil
}
@@ -136,7 +136,7 @@ func (m *CityMutation) StreetsIDs() (ids []int) {
return
}
// ResetStreets reset all changes of the streets edge.
// ResetStreets reset all changes of the "streets" edge.
func (m *CityMutation) ResetStreets() {
m.streets = nil
m.removedstreets = nil
@@ -393,7 +393,7 @@ func (m *StreetMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *StreetMutation) ResetName() {
m.name = nil
}
@@ -431,7 +431,7 @@ func (m *StreetMutation) CityIDs() (ids []int) {
return
}
// ResetCity reset all changes of the city edge.
// ResetCity reset all changes of the "city" edge.
func (m *StreetMutation) ResetCity() {
m.city = nil
m.clearedcity = false

View File

@@ -95,7 +95,7 @@ func (m *GroupMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *GroupMutation) ResetName() {
m.name = nil
}
@@ -136,7 +136,7 @@ func (m *GroupMutation) UsersIDs() (ids []int) {
return
}
// ResetUsers reset all changes of the users edge.
// ResetUsers reset all changes of the "users" edge.
func (m *GroupMutation) ResetUsers() {
m.users = nil
m.removedusers = nil
@@ -414,7 +414,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -434,7 +434,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -475,7 +475,7 @@ func (m *UserMutation) GroupsIDs() (ids []int) {
return
}
// ResetGroups reset all changes of the groups edge.
// ResetGroups reset all changes of the "groups" edge.
func (m *UserMutation) ResetGroups() {
m.groups = nil
m.removedgroups = nil

View File

@@ -114,7 +114,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -134,7 +134,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -175,7 +175,7 @@ func (m *UserMutation) FriendsIDs() (ids []int) {
return
}
// ResetFriends reset all changes of the friends edge.
// ResetFriends reset all changes of the "friends" edge.
func (m *UserMutation) ResetFriends() {
m.friends = nil
m.removedfriends = nil

View File

@@ -116,7 +116,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -136,7 +136,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -177,7 +177,7 @@ func (m *UserMutation) FollowersIDs() (ids []int) {
return
}
// ResetFollowers reset all changes of the followers edge.
// ResetFollowers reset all changes of the "followers" edge.
func (m *UserMutation) ResetFollowers() {
m.followers = nil
m.removedfollowers = nil
@@ -219,7 +219,7 @@ func (m *UserMutation) FollowingIDs() (ids []int) {
return
}
// ResetFollowing reset all changes of the following edge.
// ResetFollowing reset all changes of the "following" edge.
func (m *UserMutation) ResetFollowing() {
m.following = nil
m.removedfollowing = nil

View File

@@ -95,7 +95,7 @@ func (m *PetMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *PetMutation) ResetName() {
m.name = nil
}
@@ -133,7 +133,7 @@ func (m *PetMutation) OwnerIDs() (ids []int) {
return
}
// ResetOwner reset all changes of the owner edge.
// ResetOwner reset all changes of the "owner" edge.
func (m *PetMutation) ResetOwner() {
m.owner = nil
m.clearedowner = false
@@ -408,7 +408,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -428,7 +428,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -469,7 +469,7 @@ func (m *UserMutation) PetsIDs() (ids []int) {
return
}
// ResetPets reset all changes of the pets edge.
// ResetPets reset all changes of the "pets" edge.
func (m *UserMutation) ResetPets() {
m.pets = nil
m.removedpets = nil

View File

@@ -115,7 +115,7 @@ func (m *NodeMutation) AddedValue() (r int, exists bool) {
return *v, true
}
// ResetValue reset all changes of the value field.
// ResetValue reset all changes of the "value" field.
func (m *NodeMutation) ResetValue() {
m.value = nil
m.addvalue = nil
@@ -154,7 +154,7 @@ func (m *NodeMutation) ParentIDs() (ids []int) {
return
}
// ResetParent reset all changes of the parent edge.
// ResetParent reset all changes of the "parent" edge.
func (m *NodeMutation) ResetParent() {
m.parent = nil
m.clearedparent = false
@@ -196,7 +196,7 @@ func (m *NodeMutation) ChildrenIDs() (ids []int) {
return
}
// ResetChildren reset all changes of the children edge.
// ResetChildren reset all changes of the "children" edge.
func (m *NodeMutation) ResetChildren() {
m.children = nil
m.removedchildren = nil

View File

@@ -97,7 +97,7 @@ func (m *CardMutation) Expired() (r time.Time, exists bool) {
return *v, true
}
// ResetExpired reset all changes of the expired field.
// ResetExpired reset all changes of the "expired" field.
func (m *CardMutation) ResetExpired() {
m.expired = nil
}
@@ -116,7 +116,7 @@ func (m *CardMutation) Number() (r string, exists bool) {
return *v, true
}
// ResetNumber reset all changes of the number field.
// ResetNumber reset all changes of the "number" field.
func (m *CardMutation) ResetNumber() {
m.number = nil
}
@@ -154,7 +154,7 @@ func (m *CardMutation) OwnerIDs() (ids []int) {
return
}
// ResetOwner reset all changes of the owner edge.
// ResetOwner reset all changes of the "owner" edge.
func (m *CardMutation) ResetOwner() {
m.owner = nil
m.clearedowner = false
@@ -444,7 +444,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -464,7 +464,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -502,7 +502,7 @@ func (m *UserMutation) CardIDs() (ids []int) {
return
}
// ResetCard reset all changes of the card edge.
// ResetCard reset all changes of the "card" edge.
func (m *UserMutation) ResetCard() {
m.card = nil
m.clearedcard = false

View File

@@ -114,7 +114,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -134,7 +134,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -172,7 +172,7 @@ func (m *UserMutation) SpouseIDs() (ids []int) {
return
}
// ResetSpouse reset all changes of the spouse edge.
// ResetSpouse reset all changes of the "spouse" edge.
func (m *UserMutation) ResetSpouse() {
m.spouse = nil
m.clearedspouse = false

View File

@@ -115,7 +115,7 @@ func (m *NodeMutation) AddedValue() (r int, exists bool) {
return *v, true
}
// ResetValue reset all changes of the value field.
// ResetValue reset all changes of the "value" field.
func (m *NodeMutation) ResetValue() {
m.value = nil
m.addvalue = nil
@@ -154,7 +154,7 @@ func (m *NodeMutation) PrevIDs() (ids []int) {
return
}
// ResetPrev reset all changes of the prev edge.
// ResetPrev reset all changes of the "prev" edge.
func (m *NodeMutation) ResetPrev() {
m.prev = nil
m.clearedprev = false
@@ -193,7 +193,7 @@ func (m *NodeMutation) NextIDs() (ids []int) {
return
}
// ResetNext reset all changes of the next edge.
// ResetNext reset all changes of the "next" edge.
func (m *NodeMutation) ResetNext() {
m.next = nil
m.clearednext = false

View File

@@ -99,7 +99,7 @@ func (m *CarMutation) Model() (r string, exists bool) {
return *v, true
}
// ResetModel reset all changes of the model field.
// ResetModel reset all changes of the "model" field.
func (m *CarMutation) ResetModel() {
m.model = nil
}
@@ -118,7 +118,7 @@ func (m *CarMutation) RegisteredAt() (r time.Time, exists bool) {
return *v, true
}
// ResetRegisteredAt reset all changes of the registered_at field.
// ResetRegisteredAt reset all changes of the "registered_at" field.
func (m *CarMutation) ResetRegisteredAt() {
m.registered_at = nil
}
@@ -156,7 +156,7 @@ func (m *CarMutation) OwnerIDs() (ids []int) {
return
}
// ResetOwner reset all changes of the owner edge.
// ResetOwner reset all changes of the "owner" edge.
func (m *CarMutation) ResetOwner() {
m.owner = nil
m.clearedowner = false
@@ -425,7 +425,7 @@ func (m *GroupMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *GroupMutation) ResetName() {
m.name = nil
}
@@ -466,7 +466,7 @@ func (m *GroupMutation) UsersIDs() (ids []int) {
return
}
// ResetUsers reset all changes of the users edge.
// ResetUsers reset all changes of the "users" edge.
func (m *GroupMutation) ResetUsers() {
m.users = nil
m.removedusers = nil
@@ -746,7 +746,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -766,7 +766,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -807,7 +807,7 @@ func (m *UserMutation) CarsIDs() (ids []int) {
return
}
// ResetCars reset all changes of the cars edge.
// ResetCars reset all changes of the "cars" edge.
func (m *UserMutation) ResetCars() {
m.cars = nil
m.removedcars = nil
@@ -849,7 +849,7 @@ func (m *UserMutation) GroupsIDs() (ids []int) {
return
}
// ResetGroups reset all changes of the groups edge.
// ResetGroups reset all changes of the "groups" edge.
func (m *UserMutation) ResetGroups() {
m.groups = nil
m.removedgroups = nil

View File

@@ -99,7 +99,7 @@ func (m *GroupMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *GroupMutation) ResetName() {
m.name = nil
}
@@ -140,7 +140,7 @@ func (m *GroupMutation) UsersIDs() (ids []int) {
return
}
// ResetUsers reset all changes of the users edge.
// ResetUsers reset all changes of the "users" edge.
func (m *GroupMutation) ResetUsers() {
m.users = nil
m.removedusers = nil
@@ -179,7 +179,7 @@ func (m *GroupMutation) AdminIDs() (ids []int) {
return
}
// ResetAdmin reset all changes of the admin edge.
// ResetAdmin reset all changes of the "admin" edge.
func (m *GroupMutation) ResetAdmin() {
m.admin = nil
m.clearedadmin = false
@@ -456,7 +456,7 @@ func (m *PetMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *PetMutation) ResetName() {
m.name = nil
}
@@ -497,7 +497,7 @@ func (m *PetMutation) FriendsIDs() (ids []int) {
return
}
// ResetFriends reset all changes of the friends edge.
// ResetFriends reset all changes of the "friends" edge.
func (m *PetMutation) ResetFriends() {
m.friends = nil
m.removedfriends = nil
@@ -536,7 +536,7 @@ func (m *PetMutation) OwnerIDs() (ids []int) {
return
}
// ResetOwner reset all changes of the owner edge.
// ResetOwner reset all changes of the "owner" edge.
func (m *PetMutation) ResetOwner() {
m.owner = nil
m.clearedowner = false
@@ -838,7 +838,7 @@ func (m *UserMutation) AddedAge() (r int, exists bool) {
return *v, true
}
// ResetAge reset all changes of the age field.
// ResetAge reset all changes of the "age" field.
func (m *UserMutation) ResetAge() {
m.age = nil
m.addage = nil
@@ -858,7 +858,7 @@ func (m *UserMutation) Name() (r string, exists bool) {
return *v, true
}
// ResetName reset all changes of the name field.
// ResetName reset all changes of the "name" field.
func (m *UserMutation) ResetName() {
m.name = nil
}
@@ -899,7 +899,7 @@ func (m *UserMutation) PetsIDs() (ids []int) {
return
}
// ResetPets reset all changes of the pets edge.
// ResetPets reset all changes of the "pets" edge.
func (m *UserMutation) ResetPets() {
m.pets = nil
m.removedpets = nil
@@ -941,7 +941,7 @@ func (m *UserMutation) FriendsIDs() (ids []int) {
return
}
// ResetFriends reset all changes of the friends edge.
// ResetFriends reset all changes of the "friends" edge.
func (m *UserMutation) ResetFriends() {
m.friends = nil
m.removedfriends = nil
@@ -983,7 +983,7 @@ func (m *UserMutation) GroupsIDs() (ids []int) {
return
}
// ResetGroups reset all changes of the groups edge.
// ResetGroups reset all changes of the "groups" edge.
func (m *UserMutation) ResetGroups() {
m.groups = nil
m.removedgroups = nil
@@ -1025,7 +1025,7 @@ func (m *UserMutation) ManageIDs() (ids []int) {
return
}
// ResetManage reset all changes of the manage edge.
// ResetManage reset all changes of the "manage" edge.
func (m *UserMutation) ResetManage() {
m.manage = nil
m.removedmanage = nil