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

Method SetNillableUserID

ent/entity_create.go:166–171  ·  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

164
165// SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
166func (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.
174func (ec *EntityCreate) SetUser(u *User) *EntityCreate {

Callers

nothing calls this directly

Calls 1

SetUserIDMethod · 0.95

Tested by

no test coverage detected