<div dir="ltr"><div><div><div><div>Hi,<br><br></div>I have a project where it is intuitive to model the data by creating a bunch of models which all inherit from a base model, and share a lot of the same attributes (they'd be storing results of very similar processes).<br>
<br>Here is how I tried to attempt it:<br><br><a href="https://gist.github.com/anonymous/26a8ff2bbfe38bea32ef">https://gist.github.com/anonymous/26a8ff2bbfe38bea32ef</a><br><br></div>This fails, because "DBSchemaError: Column 'y' already exists in table 'Base'".<br>
<br></div>I can do it like this:<br><br><a href="https://gist.github.com/anonymous/e70f7aebacea9e97ff90">https://gist.github.com/anonymous/e70f7aebacea9e97ff90</a><br><br></div>It works, but quickly becomes messy when I have many attributes (up to around 30 would be needed), as there would be many useless classes, and inheriting from say 10 classes at once does not seem clear to me, compared to just defining repeated attributes. Is there a way I can make the former example work, or am I missing an alternative technique to get the same result? It seems advantageous to inherit from a base, so that it is easy to search all data by issuing queries on only one table.<br>
<br>Thanks<br clear="all"><div><div><div><div><div><br>-- <br>Regards,<br><br>Matthew Bell<br>
</div></div></div></div></div></div>