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

Method SetNillableUserID

ent/task_create.go:145–150  ·  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

143
144// SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
145func (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.
153func (tc *TaskCreate) SetUser(u *User) *TaskCreate {

Callers

nothing calls this directly

Calls 1

SetUserIDMethod · 0.95

Tested by

no test coverage detected