We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
project
1 parent 2e5e8aa commit 7c3f4a1Copy full SHA for 7c3f4a1
1 file changed
src/services.ts
@@ -246,8 +246,19 @@ export class DatabaseService {
246
project_id: projectUser.project_id
247
}
248
},
249
- update: projectUser,
250
- create: projectUser
+ // Only update scalar fields here; do not pass relation objects directly
+ update: {
251
+ status: projectUser.status,
252
+ updated_at: projectUser.updated_at,
253
+ },
254
+ // For creation, explicitly connect required relations instead of passing relation objects
255
+ create: {
256
257
+ created_at: projectUser.created_at,
258
259
+ project: { connect: { id: projectUser.project_id } },
260
+ user: { connect: { id: projectUser.user_id } }
261
+ }
262
})
263
);
264
await prisma.$transaction(insert);
0 commit comments