You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal:
I suggest changing the model property from a string to an object reference of the related model. This would improve type safety and make it consistent with how Prisma handles relations in the schema.
This change will not only enhance the readability of the code but also provide better TypeScript support, as it allows proper type checking and autocompletion when defining relations.
The text was updated successfully, but these errors were encountered:
Description:
Currently, the @prismaRelation decorator uses a string to specify the related model in the Prisma schema. For example:
Before:
Proposal:
I suggest changing the model property from a string to an object reference of the related model. This would improve type safety and make it consistent with how Prisma handles relations in the schema.
After:
This change will not only enhance the readability of the code but also provide better TypeScript support, as it allows proper type checking and autocompletion when defining relations.
The text was updated successfully, but these errors were encountered: