Open thomasbouillon opened 3 months ago
v3.0.4
https://github.com/thomasbouillon/reproduce-prisma-json-issue
The README says Json types inside type declarations won't work but the linked issue has been resolved and merged since prisma 4.16.0.
Json types inside type declarations won't work
Now it should work ?
(using mongodb if that changes anything)
schema.prisma
model A { nested B } type B { /// [CustomJson] myJsonValue Json }
yarn prisma generate
Result:
... { /** * [CustomJson] */ myJsonValue: Prisma.JsonValue }
... { /** * [CustomJson] */ myJsonValue: PrismaJson.CustomJson // <----- }
Hey @thomasbouillon, thanks for this bug report. Since then I didn't implemented and/or testes support for json inside prisma types. Are you open to PR it? remember to add unit tests...
Prerequisites
Versions
v3.0.4
A minimal reproducible example
https://github.com/thomasbouillon/reproduce-prisma-json-issue
Description
The README says
Json types inside type declarations won't work
but the linked issue has been resolved and merged since prisma 4.16.0.Now it should work ?
(using mongodb if that changes anything)
Steps to Reproduce
schema.prisma
Result:
Expected Behavior
schema.prisma
Result: