summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2018-10-19 17:10:42 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-10-19 17:12:26 -0400
commit9335c24d6c98033f4aa1ceafd23a70b88c8ae811 (patch)
treeb0e4a69f9b0e5224b7811decd2613e9b5dfa624b /lib/sqlalchemy/ext
parentd080aae128b081e6870dae325cb90202329784b4 (diff)
downloadsqlalchemy-9335c24d6c98033f4aa1ceafd23a70b88c8ae811.tar.gz
Check more specifically for hybrid attr and not mapped property
Fixed regression caused by :ticket:`4326` in version 1.2.12 where using :class:`.declared_attr` with a mixin in conjunction with :func:`.orm.synonym` would fail to map the synonym properly to an inherited subclass. Fixes: #4350 Change-Id: Ib2a9b6a125a2ac7c7ff80201746b7f10e5596226
Diffstat (limited to 'lib/sqlalchemy/ext')
-rw-r--r--lib/sqlalchemy/ext/declarative/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/declarative/base.py b/lib/sqlalchemy/ext/declarative/base.py
index 9e15582d6..a6642364d 100644
--- a/lib/sqlalchemy/ext/declarative/base.py
+++ b/lib/sqlalchemy/ext/declarative/base.py
@@ -295,7 +295,8 @@ class _MapperConfig(object):
# produces nested proxies, so we are only
# looking one level deep right now.
if isinstance(ret, InspectionAttr) and \
- ret._is_internal_proxy:
+ ret._is_internal_proxy and not isinstance(
+ ret.original_property, MapperProperty):
ret = ret.descriptor
dict_[name] = column_copies[obj] = ret