Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
Thanks for reporting this @chunkerchunker . The current zod schema generated for validating update input is excessively strict. I'm making a fix and will make it part of the next release.
Description and expected behavior
Validations on reference properties work on creation, but fail on updates.
Following is a (contrived) example showing the issue:
The issue seems to be with the generated zod schema for ModelBPrismaUpdateSchema:
I don't know what the correct fix is, but the following change fixes the test:
Environment:
Additional context Add any other context about the problem here.