diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2013-06-28 20:00:50 -0300 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2013-06-28 21:48:16 -0300 |
| commit | 6ba69c8456461aa30f415331b948f7f92dfcf211 (patch) | |
| tree | fca0233eea51bf619a97162b7e3d6d4ec3df957e /docs/ref/models | |
| parent | c196564132a351549245a5d795391ad1ea56195c (diff) | |
Removed 'depth' .select_related() argument as per deprecation TL.
Diffstat (limited to 'docs/ref/models')
| -rw-r--r-- | docs/ref/models/querysets.txt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 2788143899..6fd8a42dee 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -764,8 +764,6 @@ You can refer to any :class:`~django.db.models.ForeignKey` or :class:`~django.db.models.OneToOneField` relation in the list of fields passed to ``select_related()``. This includes foreign keys that have ``null=True`` (which are omitted in a no-parameter ``select_related()`` call). -It's an error to use both a list of fields and the ``depth`` parameter in the -same ``select_related()`` call; they are conflicting options. You can also refer to the reverse direction of a :class:`~django.db.models.OneToOneField` in the list of fields passed to @@ -781,20 +779,6 @@ If you need to clear the list of related fields added by past calls of >>> without_relations = queryset.select_related(None) -.. deprecated:: 1.5 - The ``depth`` parameter to ``select_related()`` has been deprecated. You - should replace it with the use of the ``(*fields)`` listing specific - related fields instead as documented above. - -A depth limit of relationships to follow can also be specified:: - - b = Book.objects.select_related(depth=1).get(id=4) - p = b.author # Doesn't hit the database. - c = p.hometown # Requires a database call. - -A :class:`~django.db.models.OneToOneField` is not traversed in the reverse -direction if you are performing a depth-based ``select_related()`` call. - prefetch_related ~~~~~~~~~~~~~~~~ |
