referencedTable error when querying
Hello! I'm trying to define one to many relations between the tables. While it works for most of the tables, I cannot think of why it fails for
SRSCards
.
I created a very minimal and complete drizzle.run: https://drizzle.run/y2ztrp5ylzvj18klf8kxf932
The error in the playground is different, as locally I get:
But nevertheless query fails.
The goals:
- single question can be referenced by multiple SRSCards
,
- each user can have their own SRSCards
,
- single SRSCards
belongs to only one user and only one question.
I feel this is something simple, yet I fail to notice it. Thanks for help in advance.Drizzle Run
referencedTable-error - Drizzle Run
2 Replies
Oh man, I just noticed. Sometimes asking for help and narrowing down the problem is self-healing.
The culprit was that I forgot to export this particular relation:
Now it works. Leaving the drizzle.run and this thread for future help-seekers.
This visualizer was a godsend. Tip for the future