Replies: 1 comment 1 reply
-
This sounds a lot like polymorphic association. Drizzle doesn't have first class support for this yet but it's coming pretty soon. Take a look at this issue for some workarounds. I implemented one of these workarounds myself in one of my projects. #1051 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I'm currently building a schema that looks like this, but this is pretty scaled down:
and I'm wondering, what's the best way of representing this in drizzle?
I currently have the following tables to represent the above:
The
tasks
table has atype
column which represents "exit" or "word". Bothword_tasks
andexit_tasks
have a foreign key againsttasks
and their respective subtables have foreign keys against their parent. While this works I feel I have to do so much manual "stitching" when wanting to read a complete task;I'm sure there are better ways of doing this, can someone make me a suggestion?
Beta Was this translation helpful? Give feedback.
All reactions