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:
Cannot read properties of undefined (reading 'referencedTable')  TypeError: Cannot read properties of undefined (reading 'referencedTable')

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.
Was this page helpful?