Chris Tsongas
11/12/2021, 6:47 AMprisma.$transaction([
prisma.user.update({
where: { id: input.userId },
data: {
tags: {
disconnect: [{ id }],
},
},
}),
prisma.$executeRaw`DELETE FROM "Tag" WHERE id NOT IN (SELECT "B" FROM "_UserToTag")`,
])
Maciek K
11/12/2021, 7:00 AMprisma.tag.deleteMany(
where: {
users: {
none: {}
}
}
);