Issues

Issue #3066 new

add __clause_element__() to column_property

Mike Bayer
repo owner created an issue

from #3050

diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index a0def7d..26196c1 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -148,6 +148,9 @@ class ColumnProperty(StrategizedProperty):
                                     ("instrument", self.instrument)
                                     )

+    def __clause_element__(self):
+        return self.expression
+
     @property
     def expression(self):
         """Return the primary column or expression for this ColumnProperty.

Comments (3)

  1. Log in to comment