Prisma Disconnect Where

Hello, Does someone know how I can disconnect a relation between 2 models based on the id's in an array? I.e.
await prisma.project.update({
where: {
id: projectId
},
data: {
users: {
disconnect: {
id: {
// Disconnect all users that do not have the ID of one of those
not: ["user_id_1", "user_id_45", "user_id_938"]
}
}
}
}
})
await prisma.project.update({
where: {
id: projectId
},
data: {
users: {
disconnect: {
id: {
// Disconnect all users that do not have the ID of one of those
not: ["user_id_1", "user_id_45", "user_id_938"]
}
}
}
}
})
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server