mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-05-14 21:13:08 +00:00
Document interaction of InheritanceManager and select_related. Refs #7.
This commit is contained in:
parent
3c93995d46
commit
c6bb3da275
1 changed files with 7 additions and 0 deletions
|
|
@ -277,6 +277,11 @@ it's safe to use as your default manager for the model.
|
||||||
``InheritanceManager`` currently only supports a single level of model
|
``InheritanceManager`` currently only supports a single level of model
|
||||||
inheritance; it won't work for grandchild models.
|
inheritance; it won't work for grandchild models.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
The implementation of ``InheritanceManager`` uses ``select_related``
|
||||||
|
internally. Due to `Django bug #16855`_, this currently means that it
|
||||||
|
will override any previous ``select_related`` calls on the ``QuerySet``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
``InheritanceManager`` requires Django 1.2 or later. Previous versions of
|
``InheritanceManager`` requires Django 1.2 or later. Previous versions of
|
||||||
django-model-utils included ``InheritanceCastModel``, an alternative (and
|
django-model-utils included ``InheritanceCastModel``, an alternative (and
|
||||||
|
|
@ -286,6 +291,7 @@ it's safe to use as your default manager for the model.
|
||||||
its use in new code is discouraged.
|
its use in new code is discouraged.
|
||||||
|
|
||||||
.. _contributed by Jeff Elmore: http://jeffelmore.org/2010/11/11/automatic-downcasting-of-inherited-models-in-django/
|
.. _contributed by Jeff Elmore: http://jeffelmore.org/2010/11/11/automatic-downcasting-of-inherited-models-in-django/
|
||||||
|
.. _Django bug #16855: https://code.djangoproject.com/ticket/16855
|
||||||
|
|
||||||
|
|
||||||
TimeStampedModel
|
TimeStampedModel
|
||||||
|
|
@ -373,3 +379,4 @@ directly on the manager::
|
||||||
``manager_from`` approach created dynamic ``QuerySet`` subclasses on the
|
``manager_from`` approach created dynamic ``QuerySet`` subclasses on the
|
||||||
fly, which broke pickling of those querysets. For this reason,
|
fly, which broke pickling of those querysets. For this reason,
|
||||||
``PassThroughManager`` is recommended instead.
|
``PassThroughManager`` is recommended instead.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue