-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
[FEAT] @tsed/prisma should create classes for prisma type definitions #2135
Comments
Hello @aksharp12 Thank you for the PR ;) I think the Type should be an interface and not a class. right ? See you |
Not a problem at all, @Romakita! Yes, I would think that an interface would be enough. There is no need for a repository to be generated either since types are referenced in models for prisma |
Finally, the generator will generate a class. It's better to have class for the json-mapper and there is no extra code to support it :) |
@aksharp12 PR Ready #2175 |
🎉 This issue has been resolved in version 7.7.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Information
prisma schema.prisma files allow the definition of type which can provide type safety for su-objects in a model. When using the @tsed/prisma generator, there is an exception that is thrown stating that there was an exception trying to access a property of name which is undefined.
The exception occurs here and here. The issue is that tsed only checks for models and no other objects that are supported by prisma
Example
Acceptance criteria
The text was updated successfully, but these errors were encountered: