Re: [Sqlalchemy-tickets] [sqlalchemy] #1134: ordering from query and orm relation conflict
Brought to you by:
zzzeek
From: sqlalchemy <mi...@zz...> - 2008-08-11 13:58:00
|
#1134: ordering from query and orm relation conflict ---------------------------------+------------------------------------------ Reporter: guest | Owner: zzzeek Type: defect | Status: new Priority: medium | Milestone: Component: (none) | Severity: no triage selected yet Resolution: | Keywords: Status_field: not decided upon | ---------------------------------+------------------------------------------ Changes (by zzzeek): * status_field: awaiting triage => not decided upon Comment: Just like my comment on #1079, I don't yet see the rationale here. Would you also want to cancel out the filtering on the query such that you select other `DesktopStatus` objects besides those which are associated with the parent `Desktop` ? I don't see why `order_by()` should get special treatment. If you need special per-query ordering on the `relation()`, why can't you: * set `order_by=None` on the original relation, so that `order_by()` is not defined at the base * use a distinct query - query(DesktopStatus).with_parent(mydesktop).order_by(whatever) ? The use case for `dynamic` is that the end-collection is very large and you'd like to get a filtered view of it - further sub-filtering doesn't change the definition of the collection, but an ad-hoc `order_by` does (which is why it starts relating to #1079). -- Ticket URL: <http://www.sqlalchemy.org/trac/ticket/1134#comment:1> sqlalchemy <http://www.sqlalchemy.org/> The Database Toolkit for Python |