-
-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Description and expected behavior
It seems that there are some issues filtering Json fields with Prisma.DbNull, Prisma.JsonNull & Prisma.AnyNull.
While Prisma detects it correctly, neither the hooks nor fetching directly from the ZenStack API find those records.
Screenshots
Here are some data samples for the jsonb field:
(NULL)-> Prisma.DbNullnull-> Prisma.JsonNull
Environment (please complete the following information):
- ZenStack version: 2.19.2 & 2.20.1
- Prisma version: 6.16.3
- Database type: Postgresql
import { Prisma } from "@zenstackhq/runtime/models";
const { data } = useFindManyProperty({
where: { geometry: { equals: Prisma.DbNull } }, // -> data.length returns 0
});
const { data } = useFindManyProperty({
where: { geometry: { equals: Prisma.JsonNull } }, // -> data.length returns 0
});
const { data } = useFindManyProperty({
where: { geometry: { equals: Prisma.AnyNull } }, // -> data.length returns 0
});
const { data } = useFindManyProperty({
where: { geometry: { equals: null } }, // -> data.length returns 0
});
const data = await prisma.property.findMany({
where: { geometry: { equals: Prisma.DbNull } }, // data.length returns 1
});
const data = await prisma.property.findMany({
where: { geometry: { equals: Prisma.JsonNull } }, // data.length returns 2
});
const data = await prisma.property.findMany({
where: { geometry: { equals: Prisma.AnyNull } }, // data.length returns 3
});
const data = await prisma.property.findMany({
where: { geometry: { equals: null } }, // data.length returns 2 (same as JsonNull)
});milimyname
Metadata
Metadata
Assignees
Labels
No labels