On Sep 4, 5:31 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Sep 4, 2008, at 5:33 PM, Jon wrote:
>
>
>
> > I'll note that if I use something like this in the ORM mapper
> > definition:
>
> >      order_by=meta.tables['some_table'].c.some_column,
>
> > get(pkey) continues to work *and* ORDER BY is used in the SQL.
> > While ORDER BY doesn't make sense when acquiring just one item, it
> > doesn't hurt either, and it's one small thing that people converting
> > from 0.4 would need to know. Is there any reason why compatibility
> > cannot be retained?
>
> get() should not be using the order_by specified in mapper().  If it  
> is, that's a bug.    In 0.5, since the Query is becoming much more  
> comprehensive and richly featured than it used to be, it's important  
> that it does not allow operations which make no sense to proceed.

It is.

I'd still like to request that order by be allowed - there is a big
difference between "makes no sense" and "is an error". In this case,
sqlalchemy is making an error out of sometime that doesn't need to be
- the SQL is perfectly valid and doesn't impact the result whatsoever,
negatively or positively (in the case of get()). Ordering isn't
exactly a /condition/ of the query as it is manipulation of the result
- it's not filtering the results or anything of that nature.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to