SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
(id *int)
| 164 | |
| 165 | // SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil. |
| 166 | func (ec *EntityCreate) SetNillableUserID(id *int) *EntityCreate { |
| 167 | if id != nil { |
| 168 | ec = ec.SetUserID(*id) |
| 169 | } |
| 170 | return ec |
| 171 | } |
| 172 | |
| 173 | // SetUser sets the "user" edge to the User entity. |
| 174 | func (ec *EntityCreate) SetUser(u *User) *EntityCreate { |