-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
@ofceab generate not working #316
Comments
I tried to run your snippet and it works as excepted ! |
@ofceab Can a repository be created and put a minimal example of failure? so that I can find and track this issue, otherwise I wouldn't know how to fix it |
Alternatively, invite me to your existing repository (if it's private)
|
Great ! Give few minutes to try to debug the issue from orm source code, if not able I'll invited you kindly 😉 |
Issue is got when a model name is written with underscore style i.e : client_job if we remove _ or change the name to something like clientjob or clientJob anything other combinations that doesn't contained _ then generation works fine ! Or if the orm can support such naming style it will be fine as well @medz |
I just migrated to ^4.0.0-alpha.0 and understand that now we should use PrismaUnion so I updated all my previous code and that was a lot of changes. |
There is some enforcement on the new generated models types. And if these field are update what happen under the hood after providing all these value ? I think these unnecessary values will be updated too. I'm wondering then isn't going to affect a bit the performance? In between really the code is fine, well refactored, and I'm happy that you bring nullable and decimal type |
Before 4.0, we chose the maximum input to try to support the maximum functionality. However, the reference function has been added to the new version of Prisma, and the maximum input selection cannot satisfy the three major functions of "simple settings" / "data filtering conditions" and "field reference" at the same time. Because in the early days Prisma only supported "simple settings" and "data filter conditions", the previous strategy was to select "data filter conditions" as the maximum input. Another reason is that the maximum input condition still cannot meet the database So PrismaUnion returns and is removed when Dart supports Union type data. |
@ofceab Okay, I'll start fixing the bug where the model cannot contain In addition, you mentioned that there are a lot of unnecessary required inputs. Please give me a schema and a query code. I'll create a new issue for this and fix tracking the problem. |
@ofceab I released version 4.0.0-alpha.3, which fixes the bug that model names cannot contain underscores ( |
Great news 🎉 I'll send you within few moments example for required fields |
Great 👍 |
@medz Here is an example of model `generator client { datasource db { model UserService { model User { Now in the main I try to update the service link to another user for example Here is the |
The same thing happens for |
@ofceab fixed in 4.0.0-alpha.4 version |
Thanks for the quick fix, it's work well |
@medz I'm not sure, but I tried to find fluent API within this 4.0 version, I can't have that API. |
@ofceab Yes, I deleted the fluent API, which is my intention. I found several disadvantages of fluent API:
|
@medz I understand. Good insight. |
@ofceab https://prisma.pub/getting-started/ I spent a lot of time writing examples and docs, which should now be used as the basic documentation for version 4.0. All codes in the documentation are bound to the actual runnable code in the example! In the coming days, I will write some more in-depth documentation. I'm actually torn on whether I should let 4.0 enter the next beta stage. In my case, I started a massive rewrite of 4.0 a few months ago with the intention of promoting progress on Dart Union types so that Dart Union types can happily remove the Another, original plan was for me to implement a Prisma C ABI engine to bring Prisma to Flutter. But Prisma revealed in the community that they are working on a C ABI engine. I don't know if I should wait for them. There is another problem, maybe you have discovered it, all the tools I maintain almost never write tests. |
@medz, if I understand, you want to allow the use of Prisma directly within flutter allowing apps to be able to directly interact with database ? I did some searches and found this prisma/prisma-engines#3106 (comment), great jobs ! For failed test, yes I noticed it since |
Originally posted by @ofceab in #313 (comment)
The text was updated successfully, but these errors were encountered: