From a54deba01d07e8e0971db31a96379d275ccfb0d3 Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Tue, 16 Oct 2007 21:11:39 +0000 Subject: [PATCH] Typo fix (thanks Ben!) --- doc/build/content/mappers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) }) -- 2.47.3