-
Notifications
You must be signed in to change notification settings - Fork 965
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
[Bug?]: Prisma View compatibility #9580
Comments
For now we can probably solve this issue by catching error below.
|
Thanks @majimaccho for the issue, and ofcourse the analysis behind it - much appreciated! I would say let's wait to hear back from the Prisma team as views are still a preview feature, before we implement anything. @cannikin - could I hand this over to you to track? |
Hello! So your only concern at this point is the failing tests? Did you want to try and come up with a PR that addresses it? Until Prisma adds something to You can see that we already expect some errors for foreign key relationships, you could add another catch block for the error you identified above. |
@cannikin @dac09 Thank you for your kind and quick feedback. Yeah, I already checked the Of cause I can add something to catch the error. However, the error code I got was below.
According to PostgreSQL's documentation The error code So the easiest way to handle this issue is that I just add scripts to check if the entire error message starts with It's just works on PostgreSQL but maybe not on MySQL or others. |
Any solution we come up with will need to work with MySQL and SQLite as well...did you want to try applying your same schema to those two databases as well, running the tests, and adding those errors to the |
@cannikin But for short term, I escaped from this problem by using |
What's not working?
Since View of Databases is being a feature of prisma, I think it should be supported by Redwood.js.
However, Redwood.js causes error with api test when using View.
The reason why it fails is that Redwood.js internally uses
getDMMF
method of prisma internal package to clean up db data and it does not distinguish table or view.It's obviously issues of prisma but Redwood.js needs to handle it correctly.
I've already raised above it on prisma's preview feature feadback.
prisma/prisma#17335 (comment)
How do we reproduce the bug?
No response
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: