ordering

0 views
Skip to first unread message

Geoff

unread,
May 30, 2008, 12:25:29 PM5/30/08
to sqlalchemy
Hi!

I've noticed that a very simple query has an ordering applied to it
even though I haven't asked for one. Is there a way to stop it doing
that?

the query:
Session.query(User).set_shard(shard).filter_by(uuid=uuid).all()

Thanks!

Bobby Impollonia

unread,
May 30, 2008, 12:27:27 PM5/30/08
to sqlal...@googlegroups.com
You can add
.order_by(None)
to the query to remove the default ordering.

Michael Bayer

unread,
May 30, 2008, 3:16:44 PM5/30/08
to sqlal...@googlegroups.com

order_by(None) on Query, order_by=None on mapper(), order_by=None on
relation(), or upgrade to 0.5; in 0.5 all the default "order_by"
stuff is removed.


Reply all
Reply to author
Forward
0 new messages