From: Jason Kirtland Date: Tue, 16 Oct 2007 21:11:39 +0000 (+0000) Subject: Typo fix (thanks Ben!) X-Git-Tag: rel_0_4_0~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a54deba01d07e8e0971db31a96379d275ccfb0d3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Typo fix (thanks Ben!) --- diff --git a/doc/build/content/mappers.txt b/doc/build/content/mappers.txt index 53dbaea2b4..70f5a10399 100644 --- a/doc/build/content/mappers.txt +++ b/doc/build/content/mappers.txt @@ -1162,13 +1162,13 @@ There is no requirement to be list-, or set-like at all. Collection classes can A `dict` can be used as a collection, but a keying strategy is needed to map entities loaded by the ORM to key, value pairs. The [collections](rel:docstrings_sqlalchemy.orm.collections) package provides several built-in types for dictionary-based collections: {python} - from sqlalchemy.orm.collections import column_mapped_collection, attr_mapped_collection, mapped_collection + from sqlalchemy.orm.collections import column_mapped_collection, attribute_mapped_collection, mapped_collection mapper(Item, items_table, properties={ # key by column notes = relation(Note, collection_class=column_mapped_collection(notes_table.c.keyword)) # or named attribute - notes2 = relation(Note, collection_class=attr_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)) })