]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix typo in examples
authorGaëtan de Menten <gdementen@gmail.com>
Mon, 15 Oct 2007 08:51:23 +0000 (08:51 +0000)
committerGaëtan de Menten <gdementen@gmail.com>
Mon, 15 Oct 2007 08:51:23 +0000 (08:51 +0000)
doc/build/content/mappers.txt

index 1abe4814ad3238cc634098a7be50879584e8c44d..53dbaea2b42b00f89127ffec6ef2846c416191ca 100644 (file)
@@ -122,7 +122,7 @@ And an entire "deferred group", i.e. which uses the `group` keyword argument to
 To add a SQL clause composed of local or external columns as a read-only, mapped column attribute, use the `column_property()` function.  Any scalar-returning `ClauseElement` may be used, as long as it has a `name` attribute; usually, you'll want to call `label()` to give it a specific name:
 
     {python}
-    mapper(User, users, properties={
+    mapper(User, users_table, properties={
         'fullname' : column_property(
             (users_table.c.firstname + " " + users_table.c.lastname).label('fullname')
         )
@@ -131,7 +131,7 @@ To add a SQL clause composed of local or external columns as a read-only, mapped
 Correlated subqueries may be used as well:
     
     {python}
-    mapper(User, users, properties={
+    mapper(User, users_table, properties={
         'address_count' : column_property(
                 select(
                     [func.count(addresses_table.c.address_id)],