SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
(id *int)
| 408 | |
| 409 | // SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil. |
| 410 | func (tuo *TaskUpdateOne) SetNillableUserID(id *int) *TaskUpdateOne { |
| 411 | if id != nil { |
| 412 | tuo = tuo.SetUserID(*id) |
| 413 | } |
| 414 | return tuo |
| 415 | } |
| 416 | |
| 417 | // SetUser sets the "user" edge to the User entity. |
| 418 | func (tuo *TaskUpdateOne) SetUser(u *User) *TaskUpdateOne { |