Class inheritance (Inherits keyword)
Is there anyway to easily replicate this behaviour in drizzle?
Inserting Data:
Querying Data:
This will return all rows from both student and staff tables.
3 Replies
There is no inherits keyword support in drizzle as of now, but you can achieve a similar behavior like this:
But could not query from both tables by doing select * from person;
If you need that underlying behavior in your database, you would need to create a migration file and add the sql for that inheritance
Gotcha, thanks for the insights.
Ideally I would not want to edit the migration file since it's not very explicit.
Would it then be possible to have a work-around to implement a "Class per table" inheritance as mentioned in this link?
https://stackoverflow.com/questions/9174200/how-to-create-multiple-one-to-ones/9178524#9178524
Stack Overflow
How to create multiple one to one's
I have a database set up with many tables and it all looks good apart from one bit...
Inventory Table <*-----1> Storage Table <1-----1> Van Table
^
...
My database knowledge doesn't get that far
But I don't see any problem with creating an empty migration, and adding the inherits stuff that you need