transfer label names when adapting column selectables
Issue #1942
resolved
"major" because of the testing needed
diff -r ee9102622c8538bd7e2594b05dd8bdc72317d3d0 lib/sqlalchemy/orm/query.py
--- a/lib/sqlalchemy/orm/query.py Sun Oct 03 13:11:41 2010 -0400
+++ b/lib/sqlalchemy/orm/query.py Sat Oct 09 10:03:12 2010 -0400
@@ -2696,6 +2696,7 @@
def adapt_to_selectable(self, query, sel):
c = _ColumnEntity(query, sel.corresponding_column(self.column))
+ c._label_name = self._label_name
c.entity_zero = self.entity_zero
c.entities = self.entities
Comments (3)
-
reporter -
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 0.7.0 (automated comment)
- Log in to comment
alternatively, try testing union() etc. without using labeling in the sub-selects:
test:
need to decide which approach is more appropriate. probably the former, since adapt_to_selectable currently only occurs in "from_self()" / "from_some_union(self)" types of situations.