summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolly Becker <becker.holly@gmail.com>2023-04-27 12:06:10 -0700
committerGitHub <noreply@github.com>2023-04-27 21:06:10 +0200
commit0596adcc27e4e14c4692a58cd32d39df6f48b09a (patch)
tree39ac5428660ebcb8089d164137cb408552528604
parent1329037bfed428e458547824a861ce1aa9df0c78 (diff)
downloadsqlalchemy-0596adcc27e4e14c4692a58cd32d39df6f48b09a.tar.gz
Fix import for selectinload in docs (#9712)
selectinload is in sqlalchemy.orm, not sqlalchemy
-rw-r--r--doc/build/orm/queryguide/relationships.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/build/orm/queryguide/relationships.rst b/doc/build/orm/queryguide/relationships.rst
index 9c621ea9a..7642c70a1 100644
--- a/doc/build/orm/queryguide/relationships.rst
+++ b/doc/build/orm/queryguide/relationships.rst
@@ -760,7 +760,7 @@ order to load related associations:
.. sourcecode:: pycon+sql
>>> from sqlalchemy import select
- >>> from sqlalchemy import selectinload
+ >>> from sqlalchemy.orm import selectinload
>>> stmt = (
... select(User)
... .options(selectinload(User.addresses))
@@ -798,7 +798,7 @@ value from the parent object is used:
.. sourcecode:: pycon+sql
>>> from sqlalchemy import select
- >>> from sqlalchemy import selectinload
+ >>> from sqlalchemy.orm import selectinload
>>> stmt = select(Address).options(selectinload(Address.user))
>>> result = session.scalars(stmt).all()
{execsql}SELECT