From: Mike Bayer Date: Wed, 25 May 2011 16:41:53 +0000 (-0400) Subject: clarify that attr_name is a string for [ticket:2176] X-Git-Tag: rel_0_7_1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3a547324eff14c0247c903cb2aa415123661c29;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git clarify that attr_name is a string for [ticket:2176] --- diff --git a/lib/sqlalchemy/orm/collections.py b/lib/sqlalchemy/orm/collections.py index 142519206c..7ac70fe5a4 100644 --- a/lib/sqlalchemy/orm/collections.py +++ b/lib/sqlalchemy/orm/collections.py @@ -154,7 +154,8 @@ def attribute_mapped_collection(attr_name): """A dictionary-based collection type with attribute-based keying. Returns a MappedCollection factory with a keying based on the - 'attr_name' attribute of entities in the collection. + 'attr_name' attribute of entities in the collection, where ``attr_name`` + is the string name of the attribute. The key value must be immutable for the lifetime of the object. You can not, for example, map on foreign key values if those key values will