summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-01-17 20:05:09 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-01-17 20:05:09 -0500
commitdc7d611182c9a0c364f334180c6c7a4ca99f79e6 (patch)
treed2933ea290156d4f6d47a3086907431c38f75edc /lib/sqlalchemy/orm/attributes.py
parentcbaa4c9d5d51308aeb5331b177e16d65c6dda163 (diff)
downloadsqlalchemy-dc7d611182c9a0c364f334180c6c7a4ca99f79e6.tar.gz
- tests for hybrid
- documentation for hybrid - rewrite descriptor, synonym, comparable_property documentation
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r--lib/sqlalchemy/orm/attributes.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index eb923bc4e..ca1137c3f 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -174,6 +174,13 @@ def create_proxied_attribute(descriptor):
self._comparator = self._comparator.adapted(self.adapter)
return self._comparator
+ def adapted(self, adapter):
+ """Proxy adapted() for the use case of AliasedClass calling adapted."""
+
+ return self.__class__(self.class_, self.key, self.descriptor,
+ self._comparator,
+ adapter)
+
def __get__(self, instance, owner):
if instance is None:
return self