diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2021-04-28 22:50:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-04-28 22:50:31 +0000 |
commit | 474b22dd7b522d0d1f543bbbf09dc9ad636dc43b (patch) | |
tree | c1e168012ca3944234885c9cf2c9b853e35ae54f /lib/sqlalchemy/orm/context.py | |
parent | 6efcddf36db76f074b4eb3e0c05c877047b1713f (diff) | |
parent | 41ac0c7187daed54b0ba44b2287b6679d95d2caa (diff) | |
download | sqlalchemy-474b22dd7b522d0d1f543bbbf09dc9ad636dc43b.tar.gz |
Merge "add optional proxy_class to track w/ proxy_key"
Diffstat (limited to 'lib/sqlalchemy/orm/context.py')
-rw-r--r-- | lib/sqlalchemy/orm/context.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/context.py b/lib/sqlalchemy/orm/context.py index f62115fda..55b61b19e 100644 --- a/lib/sqlalchemy/orm/context.py +++ b/lib/sqlalchemy/orm/context.py @@ -2691,8 +2691,9 @@ class _ORMColumnEntity(_ColumnEntity): # within internal loaders. orm_key = annotations.get("proxy_key", None) + proxy_owner = annotations.get("proxy_owner", _entity.entity) if orm_key: - self.expr = getattr(_entity.entity, orm_key) + self.expr = getattr(proxy_owner, orm_key) self.translate_raw_column = False else: # if orm_key is not present, that means this is an ad-hoc |