From a3a547324eff14c0247c903cb2aa415123661c29 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 25 May 2011 12:41:53 -0400 Subject: [PATCH] clarify that attr_name is a string for [ticket:2176] --- lib/sqlalchemy/orm/collections.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5