mirror of
https://github.com/django/django.git
synced 2025-01-18 14:24:39 +00:00
Added missing import in docs/ref/models/expressions.txt.
This commit is contained in:
parent
86c45d8bc6
commit
e28bd6776d
@ -92,7 +92,7 @@ Some examples
|
|||||||
>>> Company.objects.order_by("name__length")
|
>>> Company.objects.order_by("name__length")
|
||||||
|
|
||||||
# Boolean expression can be used directly in filters.
|
# Boolean expression can be used directly in filters.
|
||||||
>>> from django.db.models import Exists
|
>>> from django.db.models import Exists, OuterRef
|
||||||
>>> Company.objects.filter(
|
>>> Company.objects.filter(
|
||||||
... Exists(Employee.objects.filter(company=OuterRef("pk"), salary__gt=10))
|
... Exists(Employee.objects.filter(company=OuterRef("pk"), salary__gt=10))
|
||||||
... )
|
... )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user