On Mar 9, 7:01 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > order_by() on a dynamic relation works just fine for me could you be > more specific what issue you are seeing ?
Just that: > On Mar 9, 2008, at 1:13 PM, Thomas Wittek wrote: > I'd find it quite useful to > > have a default ordering for the related children instead of > > adding .order_by(Class.column) on each access. Of course I could use `user.messages.order_by(Message.created.desc())`. But with relation() I could define an order within the relation: relation(Message, order_by(Message.created.desc(), ...). So I only have to write `user.messages` instead of `user.messages.order_by(Message.created.desc())` on each access. With relation() the ordering can already be defined in the relation. With dynamic_loader() this is not possible. You could argue that both works and it's not too much additional code to specify the ordering explicitly. Personally, I'd find it great if dynamic_loader() would accept as much options from relation() as possible. That's especially useful when you're "refactoring" existing relation()s into dynamic_loader()s. Regards --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---