12-08-2019, 05:48 AM
Hello,
The best is to have one abstract table 'Content' and some concrete tables 'Article', 'Forum' ... that inherit from 'Content'.
If an association involves all Contents, you link it to the table 'Content'.
And if an association involves only the Articles, you link it to the table 'Article'.
I've created an ORM that manages it:
https://github.com/vmoulin78/concorde
Vincent
The best is to have one abstract table 'Content' and some concrete tables 'Article', 'Forum' ... that inherit from 'Content'.
If an association involves all Contents, you link it to the table 'Content'.
And if an association involves only the Articles, you link it to the table 'Article'.
I've created an ORM that manages it:
https://github.com/vmoulin78/concorde
Vincent