Hi there, Im trying to use the prisma client (3.0.2) with a JSON field and would like to use a filter
Here is my model:
model md_devices {
id String @id @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
tenant BigInt?
thing_id String? @db.VarChar(36)
thing_alternate_id String? @db.VarChar(36)
device_id String? @db.VarChar(36)
device_alternate_id String? @db.VarChar(36)
model_id Int?
properties Json?
tags Json?
modified_at DateTime? @db.Timestamp(6)
created_at DateTime? @db.Timestamp(6)
modified_by String? @db.VarChar(256)
created_by String? @db.VarChar(256)
}
im trying to use the json filter
where : {
tag: {
path: ['fieldName'],
equals: 'some value'
}
}
and im getting the following error
equals: '355633007893042'\n }\n },\n select: undefined,\n orderBy: undefined\n}\n\nUnknown arg
path
in where.tags.path for type JsonNullableFilter. Did you mean
not
? Available args:\ntype JsonNullableFilter {\n equals?: JsonNullValueFilter | Json\n not?: JsonNullValueFilter | Json\n}\n\n\n
any ideas