you use with_only_columns but the columns you place into it must come from that list that was sent to the select() originally, and *not* the exported columns of the select itself.
You either have to hold onto these columns externally, or get at them via the select.inner_columns accessor. On Sep 19, 2014, at 6:30 AM, Matthew Rocklin <mrock...@gmail.com> wrote: > How can I reorder the columns in a SQLAlchemy query object without causing > undue nesting? > > I've asked this question with an example on StackOverflow. Thought I'd > advertise it here as well. Please let me know if this is not preferred. > > > > http://stackoverflow.com/questions/25914329/rearrange-columns-in-sqlalchemy-select-object > > > > Best, > > -Matthew > > > -- > 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. -- 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.