mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
entc/gen: use named fields on client creations (#359)
This commit is contained in:
@@ -106,14 +106,14 @@ func (c *Card) assignValues(values ...interface{}) error {
|
||||
|
||||
// QueryOwner queries the owner edge of the Card.
|
||||
func (c *Card) QueryOwner() *UserQuery {
|
||||
return (&CardClient{c.config}).QueryOwner(c)
|
||||
return (&CardClient{config: c.config}).QueryOwner(c)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this Card.
|
||||
// Note that, you need to call Card.Unwrap() before calling this method, if this Card
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
func (c *Card) Update() *CardUpdateOne {
|
||||
return (&CardClient{c.config}).UpdateOne(c)
|
||||
return (&CardClient{config: c.config}).UpdateOne(c)
|
||||
}
|
||||
|
||||
// Unwrap unwraps the entity that was returned from a transaction after it was closed,
|
||||
|
||||
@@ -88,14 +88,14 @@ func (u *User) assignValues(values ...interface{}) error {
|
||||
|
||||
// QueryCard queries the card edge of the User.
|
||||
func (u *User) QueryCard() *CardQuery {
|
||||
return (&UserClient{u.config}).QueryCard(u)
|
||||
return (&UserClient{config: u.config}).QueryCard(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