summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-04-25 17:24:27 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-04-25 17:24:42 -0500
commit29bb0272dcadb547b2a68d4dc393b436259c9018 (patch)
tree06cd5e2649ba503b2c6665d56f04f9ed37e945e0
parent2cd33f000eeb92526d923467d745a907cdf37f9e (diff)
downloadsqlalchemy-29bb0272dcadb547b2a68d4dc393b436259c9018.tar.gz
remote_attr and local_attr refer to class bound attributes, not MapperProperty
backport from master Change-Id: If3ffe0945f47010e1ddecabfc27a6e7707031fd9 (cherry picked from commit bcf2d5826ce8b1c68ee346154e86a4ecc9ac61c7)
-rw-r--r--lib/sqlalchemy/ext/associationproxy.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py
index 4fdac827a..8c048bf1f 100644
--- a/lib/sqlalchemy/ext/associationproxy.py
+++ b/lib/sqlalchemy/ext/associationproxy.py
@@ -161,32 +161,28 @@ class AssociationProxy(interfaces.InspectionAttrInfo):
@property
def remote_attr(self):
- """The 'remote' :class:`.MapperProperty` referenced by this
+ """The 'remote' class attribute referenced by this
:class:`.AssociationProxy`.
- .. versionadded:: 0.7.3
-
- See also:
+ .. seealso::
- :attr:`.AssociationProxy.attr`
+ :attr:`.AssociationProxy.attr`
- :attr:`.AssociationProxy.local_attr`
+ :attr:`.AssociationProxy.local_attr`
"""
return getattr(self.target_class, self.value_attr)
@property
def local_attr(self):
- """The 'local' :class:`.MapperProperty` referenced by this
+ """The 'local' class attribute referenced by this
:class:`.AssociationProxy`.
- .. versionadded:: 0.7.3
-
- See also:
+ .. seealso::
- :attr:`.AssociationProxy.attr`
+ :attr:`.AssociationProxy.attr`
- :attr:`.AssociationProxy.remote_attr`
+ :attr:`.AssociationProxy.remote_attr`
"""
return getattr(self.owning_class, self.target_collection)