From c6bb3da275a3fc2fa4d90982cf299b2fd01ead08 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Wed, 14 Dec 2011 12:16:13 -0700 Subject: [PATCH] Document interaction of InheritanceManager and select_related. Refs #7. --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 108cd0b..64f768c 100644 --- a/README.rst +++ b/README.rst @@ -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 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:: ``InheritanceManager`` requires Django 1.2 or later. Previous versions of 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. .. _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 @@ -373,3 +379,4 @@ directly on the manager:: ``manager_from`` approach created dynamic ``QuerySet`` subclasses on the fly, which broke pickling of those querysets. For this reason, ``PassThroughManager`` is recommended instead. +