SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
(id *int)
| 138 | |
| 139 | // SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil. |
| 140 | func (tu *TaskUpdate) SetNillableUserID(id *int) *TaskUpdate { |
| 141 | if id != nil { |
| 142 | tu = tu.SetUserID(*id) |
| 143 | } |
| 144 | return tu |
| 145 | } |
| 146 | |
| 147 | // SetUser sets the "user" edge to the User entity. |
| 148 | func (tu *TaskUpdate) SetUser(u *User) *TaskUpdate { |