SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
(id *int)
| 565 | |
| 566 | // SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil. |
| 567 | func (suo *ShareUpdateOne) SetNillableUserID(id *int) *ShareUpdateOne { |
| 568 | if id != nil { |
| 569 | suo = suo.SetUserID(*id) |
| 570 | } |
| 571 | return suo |
| 572 | } |
| 573 | |
| 574 | // SetUser sets the "user" edge to the User entity. |
| 575 | func (suo *ShareUpdateOne) SetUser(u *User) *ShareUpdateOne { |