summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r--lib/sqlalchemy/orm/attributes.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index f37928cc1..674c57fea 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -104,6 +104,10 @@ class QueryableAttribute(
def _supports_population(self):
return self.impl.supports_population
+ @property
+ def _impl_uses_objects(self):
+ return self.impl.uses_objects
+
def get_history(self, instance, passive=PASSIVE_OFF):
return self.impl.get_history(
instance_state(instance), instance_dict(instance), passive
@@ -310,6 +314,13 @@ def create_proxied_attribute(descriptor):
_is_internal_proxy = True
@property
+ def _impl_uses_objects(self):
+ return (
+ self.original_property is not None
+ and getattr(self.class_, self.key).impl.uses_objects
+ )
+
+ @property
def property(self):
return self.comparator.property