You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Json field that will only ever contain an array (not an object). I have tried following this and I also read #8977 and upgraded from 2.3 to 3.0.2 but issue remains.
How to reproduce
Schema:
model Test {
arrayField Json? @default("[]") @db.JsonB
}
await prisma.test.create({ data: { arrayField: ["test", "data"]})
await prisma.test.findMany({ where: { arrayField: { array_contains: ["test"] } } })
// ERROR:
Unknown arg `array_contains` in where.arrayField.array_contains for type JsonNullableFilter. Available args:
type JsonNullableFilter {
equals?: JsonNullValueFilter | Json
not?: JsonNullValueFilter | Json
}
Even the typings only actually give equals or not
I have tried using Json / Json? using JsonB, not sertting defaults, all different combinations, but array_contains just does not exist in the where clause.
Expected behavior
expect path and array_contains to exist in the where filter.
Bug description
I have a Json field that will only ever contain an array (not an object). I have tried following this and I also read #8977 and upgraded from 2.3 to 3.0.2 but issue remains.
How to reproduce
Schema:
Even the typings only actually give
equals
ornot
I have tried using Json / Json? using JsonB, not sertting defaults, all different combinations, but array_contains just does not exist in the where clause.
Expected behavior
expect
path
andarray_contains
to exist in the where filter.Prisma information
Environment & setup
postgres, macos, node 12.18.3
Prisma Version
The text was updated successfully, but these errors were encountered: