I’m trying to migrate from prisma 3.x.x, to version 5.x.x. However, I’m having a problem trying to do a where In, on a JSON column.
This use to work, but when trying in the new version produces an error. Does anyone know how to achieve this on the new version? It’s not listed in their docs. https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types/working-with-json-fields#filter-on-a-json-field-simple
const result = await prisma.user.findMany({
where: {
OR: [
{
user_data: {
path: [‘user’, ’email’],
in: input.emails
}
}
],
},
})
model user {
user_id String
user_data Json // { email: String }
@@index([user_id])
}