MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / SetNillableUserID

Method SetNillableUserID

ent/task_update.go:410–415  ·  view source on GitHub ↗

SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.

(id *int)

Source from the content-addressed store, hash-verified

408
409// SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
410func (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.
418func (tuo *TaskUpdateOne) SetUser(u *User) *TaskUpdateOne {

Callers

nothing calls this directly

Calls 1

SetUserIDMethod · 0.95

Tested by

no test coverage detected