Skip to content

Attirbute not known : "@relation". Error #24139

Closed Answered by ludralph
akshatg5 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @akshatg5 👋

The error is due to the incorrect use of the @relation attribute in your Comment and Upvote 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 and Upvote 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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@akshatg5
Comment options

Answer selected by ludralph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants