mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: use named fields on client creations (#359)
This commit is contained in:
@@ -97,14 +97,14 @@ func (pe *Pet) assignValues(values ...interface{}) error {
|
||||
|
||||
// QueryOwner queries the owner edge of the Pet.
|
||||
func (pe *Pet) QueryOwner() *UserQuery {
|
||||
return (&PetClient{pe.config}).QueryOwner(pe)
|
||||
return (&PetClient{config: pe.config}).QueryOwner(pe)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this Pet.
|
||||
// Note that, you need to call Pet.Unwrap() before calling this method, if this Pet
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
func (pe *Pet) Update() *PetUpdateOne {
|
||||
return (&PetClient{pe.config}).UpdateOne(pe)
|
||||
return (&PetClient{config: pe.config}).UpdateOne(pe)
|
||||
}
|
||||
|
||||
// Unwrap unwraps the entity that was returned from a transaction after it was closed,
|
||||
|
||||
@@ -82,14 +82,14 @@ func (u *User) assignValues(values ...interface{}) error {
|
||||
|
||||
// QueryPets queries the pets edge of the User.
|
||||
func (u *User) QueryPets() *PetQuery {
|
||||
return (&UserClient{u.config}).QueryPets(u)
|
||||
return (&UserClient{config: u.config}).QueryPets(u)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this User.
|
||||
// Note that, you need to call User.Unwrap() before calling this method, if this User
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
func (u *User) Update() *UserUpdateOne {
|
||||
return (&UserClient{u.config}).UpdateOne(u)
|
||||
return (&UserClient{config: u.config}).UpdateOne(u)
|
||||
}
|
||||
|
||||
// Unwrap unwraps the entity that was returned from a transaction after it was closed,
|
||||
|
||||
Reference in New Issue
Block a user