When using the option createRelationValuesTypes, together with Prisma composite types (currently only available when using the MongoDB provider), the generated WithRelations zod schemas and types, does not use the other generated WithRelations zod schemas and types.
In other words, nested composite types does not work.
(Sorry for that terrible and confusing explanation.)
When using the option createRelationValuesTypes, together with Prisma composite types (currently only available when using the MongoDB provider), the generated WithRelations zod schemas and types, does not use the other generated WithRelations zod schemas and types. In other words, nested composite types does not work.
(Sorry for that terrible and confusing explanation.)
Here's an example in the README.md demonstrating my expectations: https://github.com/chrishoermann/zod-prisma-types#createrelationvaluestypes And another relevant issue: #54
I've also created a simple example, to further demonstrate my issue.
Example Prisma Schema
Expected output
Resulting output
Package versions: