]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Typo fix
authorJason Kirtland <jek@discorporate.us>
Tue, 20 Nov 2007 18:32:01 +0000 (18:32 +0000)
committerJason Kirtland <jek@discorporate.us>
Tue, 20 Nov 2007 18:32:01 +0000 (18:32 +0000)
doc/build/content/mappers.txt

index 55642fa1e92a8f6769765ea3dcb7d70d41eca372..1203c287ae64d386a24f082103c93d458428c557 100644 (file)
@@ -1168,11 +1168,11 @@ A `dict` can be used as a collection, but a keying strategy is needed to map ent
 
     mapper(Item, items_table, properties={
         # key by column
-        notes = relation(Note, collection_class=column_mapped_collection(notes_table.c.keyword))
+        'notes': relation(Note, collection_class=column_mapped_collection(notes_table.c.keyword)),
         # or named attribute 
-        notes2 = relation(Note, collection_class=attribute_mapped_collection('keyword'))
+        'notes2': relation(Note, collection_class=attribute_mapped_collection('keyword')),
         # or any callable
-        notes3 = relation(Note, collection_class=mapped_collection(lambda entity: entity.a + entity.b))
+        'notes3': relation(Note, collection_class=mapped_collection(lambda entity: entity.a + entity.b))
     })
 
     # ...