Closed
Description
Migrated issue, originally created by Anonymous
If one uses raw queries like this:
res = list(session.execute("SELECT a,b FROM my_subscription"))
then we see (by printing) that res is [13209L), (1L, 7057L), (2L, 410L), (10L, 3L), (6L, 10L)]((0L,)
But these aren't tuples, so when we try to sort() that list (or use sorted() on it), records just get weirdly mixed up.
I guess RowProxy objects should have the same behaviour as tuples when it comes to sorting, or else they should display themselves as objects instead of tuples, to avoid confusing unexperienced users.
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
sqlalchemy-bot commentedon Oct 21, 2013
Michael Bayer (@zzzeek) wrote:
patch:
sqlalchemy-bot commentedon Oct 21, 2013
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Nov 19, 2013
Michael Bayer (@zzzeek) wrote:
02f21ff
sqlalchemy-bot commentedon Nov 19, 2013
Changes by Michael Bayer (@zzzeek):