jerryji wrote: > > Hi, > > My simple Session.query(model.SomeClass).all() is producing an SQL > query statement with an unwanted "ORDER BY some_table.primary_key". > How can this be turned off/overwritten? > > Thanks in advance and Merry X'mas! >
ordering by primary key or OID is a configurable default. You can setup your mapper with mapper(....., order_by=None) (same applies to relation()), or at the query level as query(SomeClass).order_by(None).all(). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
