From 7d6916e82700896ef23c50720d8cf0de4d6b9074 Mon Sep 17 00:00:00 2001 From: matt ferrante Date: Mon, 6 Jan 2020 16:44:32 -0700 Subject: Fixed #29789 -- Added support for nested relations to FilteredRelation. --- docs/ref/models/querysets.txt | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 6edc508661..9f541d5414 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3707,17 +3707,10 @@ operate on vegetarian pizzas. ``FilteredRelation`` doesn't support: -* Conditions that span relational fields. For example:: - - >>> Restaurant.objects.annotate( - ... pizzas_with_toppings_startswith_n=FilteredRelation( - ... 'pizzas__toppings', - ... condition=Q(pizzas__toppings__name__startswith='n'), - ... ), - ... ) - Traceback (most recent call last): - ... - ValueError: FilteredRelation's condition doesn't support nested relations (got 'pizzas__toppings__name__startswith'). * :meth:`.QuerySet.only` and :meth:`~.QuerySet.prefetch_related`. * A :class:`~django.contrib.contenttypes.fields.GenericForeignKey` inherited from a parent model. + +.. versionchanged:: 3.2 + + Support for nested relations was added. -- cgit v1.3