On Thursday, September 24, 2015 at 3:05:56 AM UTC-4, David Allouche wrote:
> That looks like the right approach. There is probably something else in > your actual code that is causing "it [to] not work". > > To get a better understanding of "it did not work", I would look at the > "str(query)" before and after the stuff with the aliased table. > The _aliased object (returned by `sqlalchemy.orm.alias()` does not have addressable columns. touching _aliased.string_id and _aliased.c.string_id both raise errors. The rest of the code works fine in production, I just can't seem to figure out how to add this table onto the query under a different name which can be queried against. The closest thing I could do was to nest everything into subselects -- but the sql is grossly inefficient. -- 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 sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.