Misleading Error for non-unique relation names #12986
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: dmmf
Milestone
Bug description
If you have two relations, that use the same name
@relation("a")
, runningprisma format
returns an unspecific error message.Running the command with
DEBUG="*"
give me the following errorAs a note, the VS Code prisma extension, does not throw an Error for this. (Which is somewhat okay for me)
How to reproduce
Example repository
https://github.com/Haschikeks/prisma-relation-name-bug
If you change the relation to be equal, for example both to
a
and then runprisma format
the above mentioned error appears.Expected behavior
It would be nice, if there was an error message that indicates, that there is a problem with the relation names. This would already help in tracking down the problem.
Prisma information
Prisma schema:
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: