]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix foreign_keys example
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 May 2008 16:06:22 +0000 (16:06 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 May 2008 16:06:22 +0000 (16:06 +0000)
doc/build/content/mappers.txt

index e87432e17951696f50e8cdf6da39246c4bd9a830..fca2076bc7577e00f5fbdf6f6598fc21fa5d5065 100644 (file)
@@ -1105,9 +1105,10 @@ When using `primaryjoin` and `secondaryjoin`, SQLAlchemy also needs to be aware
     {python}
     mapper(Address, addresses_table)
     mapper(User, users_table, properties={
-        'addresses' : relation(Address, primaryjoin=
-                    users_table.c.user_id==addresses_table.c.user_id)
-    }, foreign_keys=[addresses_table.c.user_id])
+        'addresses' : relation(Address, 
+             primaryjoin=users_table.c.user_id==addresses_table.c.user_id,
+             foreign_keys=[addresses_table.c.user_id])
+    })
 
 ##### Building Query-Enabled Properties {@name=properties}