Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All 'XXXIncludeSchema' Are Generated as 'z.object({ }).strict()' in MongoDB Environments #189

Open
ksdaylight opened this issue Sep 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ksdaylight
Copy link

Great job on the library; it's made my dev life easier. Thanks

However, I have come across an issue that only appears when I am using MongoDB. The issue does not manifest when I switch to traditional relational databases like MySQL.

Specifically, all generated 'XXXIncludeSchema' objects appear as:
image
Even when the corresponding Prisma.XXXInclude has actual content.
image

On the other hand, everything works as expected when I am using a traditional relational database like MySQL.
image
This issue is causing some inconsistencies in my application and I was wondering if this is a known issue or if there's a workaround for it.

Looking forward to your response, and thank you once again for this fantastic library!

My environment versions are:

prisma: 5.1.1
zod: 3.21.1
zod-prisma-types: ^2.7.9

@chrishoermann
Copy link
Owner

@ksdaylight Thanks for reaching out. Since I do not use MongoDB in any of my projects I don't have real usecases. It would be nice if you can provide a schema I can work with.

This could also be something prisma changed in the 5.x.x release since the include schemas were generally empty in my tests I did some month back.

@chrishoermann chrishoermann self-assigned this Oct 14, 2023
@chrishoermann chrishoermann added the bug Something isn't working label Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants