You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updates the current Prisma model record and optionally rewrites relation fields in one call.
107
+
*
108
+
* @param id Record identifier passed to the Prisma `where` clause.
109
+
* @param data Plain object that can mix scalar fields (written directly) and relation fields (handled via Prisma relation operations).
110
+
* @param options.relationOperation Prisma relation operation (`set`, `connect`, `disconnectMany`, etc.) applied to every relation key found in `data`. Defaults to `set`.
111
+
* @param options.relationvalueMapper Optional transformer that receives each relation value from `data` before it is sent to Prisma. Use it to build compound keys, wrap payloads, or handle `connectOrCreate` inputs.
112
+
*
113
+
* @example
114
+
* // Replace the existing tags with two tag ids while mapping the ids to Prisma connect objects.
constresult=await(this.repositoryasany).update({where: { id },data: finalData});
149
+
this.onPostUpdate.next({ id,inputData: data, result });
150
+
returnresult;
151
+
}
152
+
153
+
/**
154
+
* Creates a Prisma model record while optionally performing relation writes in the same call.
155
+
*
156
+
* @param data Plain object that can mix scalar columns and relation fields destined for Prisma create operations.
157
+
* @param options.relationOperation Prisma relation operation (`connect`, `connectOrCreate`, `create`, `createMany`) applied to every relation key from `data`. Defaults to `connect`.
158
+
* @param options.relationvalueMapper Optional transformer invoked per relation value from `data` before passing it to Prisma. Ideal for wrapping ids in `connect` objects or preparing nested `create` payloads.
159
+
*
160
+
* @example
161
+
* // Create a post and connect it with existing tag ids.
0 commit comments