On Wednesday, July 13, 2016 at 11:01:08 AM UTC-4, Jonathan Underwood wrote:
Thanks - you're right. That's weird though, as it contradicts the > documentation. Anyway, I've found it all works as expected, simply by not > bothering to create the aliases: > I think I've run into this problem before where I needed to address the select by name; IIRC, I think the trick was using `.subquery()`. Aside from it being more correct in certain situations, the problem had to do with the the existence (or non-existence) of parenthesis in the compiled query across backends, and if the clause was given an automatic alias or not. Postgres would allow a 'not entirely correct' query and do as I intended, but Sqlite could not handle it. IIRC there are also some ways to use `.select()` in queries like this. The above works, so keep it. I'm just bringing this up for future reference. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
