summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/mapping/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-02-19 01:25:56 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-02-19 01:25:56 +0000
commit36383494b512143328d3c14022d4db3ccedfdf06 (patch)
treef9471040e6fc2c3b6e9fb7dae529fdb2cad013f3 /lib/sqlalchemy/mapping/mapper.py
parentbca0afa1cedc38247dc7af4e53dec7faf1aca42f (diff)
downloadsqlalchemy-36383494b512143328d3c14022d4db3ccedfdf06.tar.gz
some comments, changed SmartProperty to be smarter, UOW
version has "property" accessor which returns MapperProperty at the class level
Diffstat (limited to 'lib/sqlalchemy/mapping/mapper.py')
-rw-r--r--lib/sqlalchemy/mapping/mapper.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/mapping/mapper.py b/lib/sqlalchemy/mapping/mapper.py
index 5fed7c7f2..88b803b37 100644
--- a/lib/sqlalchemy/mapping/mapper.py
+++ b/lib/sqlalchemy/mapping/mapper.py
@@ -178,6 +178,11 @@ class Mapper(object):
engines = property(lambda s: [t.engine for t in s.tables])
def add_property(self, key, prop):
+ """adds an additional property to this mapper. this is the same as if it were
+ specified within the 'properties' argument to the constructor. if the named
+ property already exists, this will replace it. Useful for
+ circular relationships, or overriding the parameters of auto-generated properties
+ such as backreferences."""
if sql.is_column(prop):
self.columns[key] = prop
prop = ColumnProperty(prop)