I search for a way to get polymorphic inheritance like in "Single table inheritance" [1]
I have found this comparison site:
https://www.djangopackages.com/grids/g/model-inheritance/Before I try each, I want to ask here, if someone answer some questions:
I have three classes: Parent, ChildA, ChildB.
The result of Parent.objects.filter() should return Child instances and should query only one db table.
Unfortunately one one app has filed the column "amount of queries" in the comparison grid.
What about the other apps?
Next question:
If the class Parent is in the parentapp application, and I want to subclass this model in a different
application (childapp). The table which belongs to parentapp needs to be changed: new columns
need to be added. Does south handle the migrations like in the build in (django core) inheritance solutions?
Why not the build in inheritance solutions? My point of view: multi table inheritance is slow and with abstract base classes
you can't query the base class. Both solutions are not polymorphic.
[1]
http://en.wikipedia.org/wiki/Single_Table_Inheritance