SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
(id *int)
| 143 | |
| 144 | // SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil. |
| 145 | func (tc *TaskCreate) SetNillableUserID(id *int) *TaskCreate { |
| 146 | if id != nil { |
| 147 | tc = tc.SetUserID(*id) |
| 148 | } |
| 149 | return tc |
| 150 | } |
| 151 | |
| 152 | // SetUser sets the "user" edge to the User entity. |
| 153 | func (tc *TaskCreate) SetUser(u *User) *TaskCreate { |