-
QuestionGiven the schema.prisma file: // This is your Prisma schema file, // Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
How to reproduce (optional)Expected behavior (optional)No Errors? Information about Prisma Schema, Client Queries and Environment (optional)// Add your schema.prisma // Add any relevant Prisma Client queries here
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @akshatg5 👋 The error is due to the incorrect use of the In your You can take a look at this section of the documentation on how to use relation fields. |
Beta Was this translation helpful? Give feedback.
Hi @akshatg5 👋
The error is due to the incorrect use of the
@relation
attribute in yourComment
andUpvote
models. The@relation
attribute is used to define relations between models in Prisma, and it should only be applied to relation fields, not to the model itself.In your
Comment
andUpvote
models, you have applied@@relation
at the model level, which is incorrect. The@@relation
attribute does not exist in Prisma. You should remove these lines from your Comment and Upvote models.You can take a look at this section of the documentation on how to use relation fields.