prepareCreateInput
Function: prepareCreateInput()
prepareCreateInput<
T>(model,input):T
Defined in: packages/core/src/services/domainservice.service.ts:80
Client input of a create (REST, gRPC, MCP and GraphQL): sanitizeModelInput, plus
- the parent link (
ModelParentattribute, from the nested URL or the input) is kept even when_-prefixed, unless protected: the caller must then check the parent (checkModelParent); - a client
uuidis dropped forUuidModels: the key is always generated, so a create can neither target an existing object nor reveal that a uuid exists. Natural-key models keep the client key (an existing key is a 409).
Type Parameters
T
T = any
Parameters
model
ModelClass<any>
the model class
input
T
the raw client input
Returns
T
the input to load in the new object