- changed status to resolved
multiple label refs to the same col + orm + union
Issue #1852
resolved
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.sql import column
c1 = column('foo')
q = create_session().query(
c1.label('f'),
c1.label('b'))
q2 = create_session().query(
c1.label('f'),
column('bar').label('b'))
q = q.union_all(q2)
print q.statement
SELECT anon_1.b
FROM (SELECT foo AS f, foo AS b UNION ALL SELECT foo AS f, bar AS b) AS anon_1
0.6.3 milestone is tentative - this will likely be pushed to 0.6.xx
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.6.4 (automated comment)
- Log in to comment
can't believe I can still figure these out.....cbb0a03a560fd33933971e7b4c9293918612a2cf