Re: [sqlalchemy] Can't get ORM to correlate when the query has a union

2018-07-16 Thread 'David C' via sqlalchemy
I'll try exists().where(). Thanks for the bug fix! -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full

Re: [sqlalchemy] Can't get ORM to correlate when the query has a union

2018-07-14 Thread Mike Bayer
On Sat, Jul 14, 2018 at 2:26 AM, 'David C' via sqlalchemy wrote: > I can't find any way to get SqlAlchemy to correlate a table referenced in a > computed column when the query has a union. > > Simplified test case: > > Base = declarative.declarative_base() > > > class MyTable(Base): >

[sqlalchemy] Can't get ORM to correlate when the query has a union

2018-07-14 Thread 'David C' via sqlalchemy
I can't find any way to get SqlAlchemy to correlate a table referenced in a computed column when the query has a union. Simplified test case: Base = declarative.declarative_base() class MyTable(Base): __tablename__ = 'my_table' score = Column(Integer, primary_key=True) my_alias =