diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-04-03 21:43:22 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-04-03 21:43:22 +0000 |
commit | abc376c7025b53c790392026e0deaf305299ab6f (patch) | |
tree | 7b08c09b58eaba04488ad93ddc3965530ac4095b /lib/sqlalchemy/attributes.py | |
parent | 837b5407a4ad385f545c4ba2fb316f3f8056ca9f (diff) | |
download | sqlalchemy-abc376c7025b53c790392026e0deaf305299ab6f.tar.gz |
added 'entity_name' keyword argument to mapper. a mapper is now associated with a class via
the class object as well as the optional entity_name parameter, which is a string defaulting to None.
any number of primary mappers can be created for a class, qualified by the entity name. instances of those classes
will issue all of their load and save operations through their entity_name-qualified mapper, and maintain separate identity from an otherwise equilvalent object.
Diffstat (limited to 'lib/sqlalchemy/attributes.py')
-rw-r--r-- | lib/sqlalchemy/attributes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/attributes.py b/lib/sqlalchemy/attributes.py index d1b0738de..6424c9d79 100644 --- a/lib/sqlalchemy/attributes.py +++ b/lib/sqlalchemy/attributes.py @@ -72,6 +72,11 @@ class SmartProperty(object): h.append_nohistory(value) class ManagedAttribute(object): + """base class for a "managed attribute", which is attached to individual instances + of a class mapped to the keyname of the property, inside of a dictionary which is + attached to the object via the propertyname "_managed_attributes". Attribute access + which occurs through the SmartProperty property object ultimately calls upon + ManagedAttribute objects associated with the instance via this dictionary.""" def __init__(self, obj, key): self.__obj = weakref.ref(obj) self.key = key |