#17752: Serialization and multi-table inheritance
-------------------------------+--------------------
Reporter: issarisc@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.3
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
The section on serializing models using multi-table inheritance is rather
unhelpful IMHO. The solution the example suggests is of very limited use:
They only show how to query all parent Model objects and all child Model
objects and concatenate these lists.
In practice, I think it would be rather unlikely that anyone would want to
use it like this, as the results of both queries are not connected in any
way.
A more likely use-case would be if someone was querying the Restaurant
Model, and would want to show the name of the restaurant for each of the
results in the resulting QuerySet.
The documentation gives no solution or hint in the right direction
regarding this, so I assume the only way would be to create a new list
myself with the combined results and serializing that list.
--
Ticket URL: <https://code.djangoproject.com/ticket/17752>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.