[sqlalchemy] Re: Lack of parentheses in subquery syntax

2009-03-21 Thread Michael Bayer
its looking for a scalar, not a subquery(). I dont think query() has as_scalar() yet so use a select([model.OnAir.user_id]).as_scalar() for this. On Mar 21, 2009, at 4:30 AM, Victor Lin wrote: Hi, I am using Elixir that based on SQLAlchemy to do some query like this: onAirs =

[sqlalchemy] Re: Lack of parentheses in subquery syntax

2009-03-21 Thread Michael Bayer
I've committed a change in 5852 that will allow subquery() to be used in a scalar context in a WHERE clause - as_scalar() is now called on Alias objects. On Mar 21, 2009, at 4:30 AM, Victor Lin wrote: Hi, I am using Elixir that based on SQLAlchemy to do some query like this: onAirs =