Description and expected behavior
Error on filter by JSON field with enum values. Easy to understand by looking at the screenshots below.
Screenshots
...
enum BKPType {
...
CAPSTONE
...
}
type BKPProposal {
...
bkpType BKPType?
...
}
model BKP with Base {
...
Proposal BKPProposal @json
...
}
function queryBkps() {
return db.bKP.findMany({
where: {
Proposal: {
bkpType: "CAPSTONE",
},
},
});
}
But this works (but requires type check bypassing in the zenstack dist code)
function queryBkps() {
return db.bKP.findMany({
where: {
// @ts-expect-error
Proposal: {
bkpType: '"CAPSTONE"',
},
},
});
}
Environment:
- ZenStack version: 3.8.3
- Database type: Postgresql
- Node.js/Bun version: Node 26.4.0
- Package manager: pnpm
Additional context
Add any other context about the problem here.
Description and expected behavior
Error on filter by JSON field with enum values. Easy to understand by looking at the screenshots below.
Screenshots
But this works (but requires type check bypassing in the zenstack dist code)
Environment:
Additional context
Add any other context about the problem here.