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

Method SetNillableUserID

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

138
139// SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
140func (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.
148func (tu *TaskUpdate) SetUser(u *User) *TaskUpdate {

Callers

nothing calls this directly

Calls 1

SetUserIDMethod · 0.95

Tested by

no test coverage detected