]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- fix incorrect example in inheritance docs
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Sep 2015 15:17:13 +0000 (11:17 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 15 Sep 2015 15:17:29 +0000 (11:17 -0400)
(cherry picked from commit 7eb34baf99179eec966ddd8b3607a6d8cfdfba21)

doc/build/orm/inheritance.rst

index 0713634bc468591f18387f78b65a0974c5c1e029..290d8099ec4fbcfb0c72b680a73b8275ccd4e80e 100644 (file)
@@ -228,9 +228,9 @@ subclasses:
     entity = with_polymorphic(Employee, [Engineer, Manager])
 
     # join to all subclass tables
-    entity = query.with_polymorphic(Employee, '*')
+    entity = with_polymorphic(Employee, '*')
 
-    # use with Query
+    # use the 'entity' with a Query object
     session.query(entity).all()
 
 It also accepts a third argument ``selectable`` which replaces the automatic
@@ -249,7 +249,7 @@ should be used to load polymorphically::
                 employee.outerjoin(manager).outerjoin(engineer)
             )
 
-    # use with Query
+    # use the 'entity' with a Query object
     session.query(entity).all()
 
 Note that if you only need to load a single subtype, such as just the