summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-05-25 12:41:53 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-05-25 12:41:53 -0400
commita3a547324eff14c0247c903cb2aa415123661c29 (patch)
tree6d8e865df6a830f17ca265707a1d9d498c6d23a7
parent262f6b4d1941b1051fe0150a5f268f2c81e368db (diff)
downloadsqlalchemy-a3a547324eff14c0247c903cb2aa415123661c29.tar.gz
clarify that attr_name is a string for [ticket:2176]
-rw-r--r--lib/sqlalchemy/orm/collections.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/collections.py b/lib/sqlalchemy/orm/collections.py
index 142519206..7ac70fe5a 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