It's not different at all. I've just noticed that on the one hand it *is* possible to use query.order_by(None) to remove any previously set ordering, but on the other hand that _no_select_modifiers() in sqlalchemy/orm/query.py checks for False (and not None). It would be clearer to me if either order_by(False) would work too or - even better - if _no_select_modifiers() would allow None for _order_by.
Andi On Wed, Jun 16, 2010 at 3:30 PM, Michael Bayer <mike...@zzzcomputing.com> wrote: > its not really provided right now, the same way saying query.filter(None) > won't reset any existing WHERE criterion, or join(None) doesn't remove all > joins. This issue has come up before. How is order_by() different ? > > > On Jun 16, 2010, at 8:05 AM, Andi Albrecht wrote: > >> Hi, >> >> I'm a bit curious about how to unset an order_by in 0.6. >> >> query.order_by(None) should do it, but in sqlalchemy/orm/query.py in >> _no_select_modifiers() the notset value for the _order_by attribute is >> False. In turn, the order_by() method doesn't seem to accept False. >> >> What would be a proper way to unset an order_by? In my case the >> order_by is set when classes are mapped. >> >> Best regards, >> >> Andi >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To post to this group, send email to sqlalch...@googlegroups.com. >> To unsubscribe from this group, send email to >> sqlalchemy+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/sqlalchemy?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.