Mike Willbanks
11/22/2021, 6:54 PMawait prisma.model.update({
where: {
model_id: {
not: +model.model_id,
},
},
data: {
is_archived: true
},
});
errorInvalid `prisma.model.update()` invocation:{where: {model_id: {not: 7}~~~~~~~~},data: {is_archived: true}}Argument model_id: Got invalid value{not: 7}on prisma.updateOnemodel. Provided Json, expected IntMike Willbanks
11/22/2021, 6:54 PM<https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#not>
const result = await prisma.user.findMany({
where: {
name: {
not: 'Eleanor',
},
},
})
Are these operators not allowed on updates?Mike Willbanks
11/22/2021, 7:05 PMupdate but only updateMany. We knew that only a single item would be in this state which was why we were using update but have since switched to updateMany and that has resolved the issue.