mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #16855 -- select_related() chains as expected.
select_related('foo').select_related('bar') is now equivalent to
select_related('foo', 'bar').
Also reworded docs to recommend select_related(*fields) over select_related()
This commit is contained in:
@@ -533,6 +533,12 @@ Miscellaneous
|
||||
you relied on the default field ordering while having fields defined on both
|
||||
the current class *and* on a parent ``Form``.
|
||||
|
||||
* :meth:`~django.db.models.query.QuerySet.select_related` now chains in the
|
||||
same way as other similar calls like ``prefetch_related``. That is,
|
||||
``select_related('foo', 'bar')`` is equivalent to
|
||||
``select_related('foo').select_related('bar')``. Previously the latter would
|
||||
have been equivalent to ``select_related('bar')``.
|
||||
|
||||
Features deprecated in 1.7
|
||||
==========================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user