summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-01-06 09:24:08 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-01-06 09:25:20 -0500
commit21ee595ba9ef3e7abc8982fac7bf488c904cf9c9 (patch)
tree23cb38128f0f6574f7e7152aba72efd419d2ed64 /lib/sqlalchemy
parentcd0b050ce07e7fe1b46ef8fa2b5aabba9f812e41 (diff)
downloadsqlalchemy-21ee595ba9ef3e7abc8982fac7bf488c904cf9c9.tar.gz
fix incorrect with_parent() example
The lead example for the with_parent() function docstring was backwards, based on the standard User/Address mapping used in the documentation. Fixes: #7540 Change-Id: Iaff7dc6fdd0c323509231ae5f3122ed76a420915
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index a282adea4..262898127 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -1852,7 +1852,7 @@ def with_parent(instance, prop, from_entity=None):
E.g.::
- stmt = select(Address).where(with_parent(some_user, Address.user))
+ stmt = select(Address).where(with_parent(some_user, User.addresses))
The SQL rendered is the same as that rendered when a lazy loader