On Dec 6, 2012, at 11:14 AM, Julien Cigar wrote: > > Another thing I wondered is if there is a shortcut (not joinedload()) for: > > Bar.query.join(Foo).options(orm.contains_eager(Bar.foo)).filter(Foo.id==1) > > I thought something like: > > Bar.query.join(Foo, prop='foo').filter(Foo.id==1) > > (to be able to specify the property directly in the join)
well yeah if we started adding all kinds of alternate shortcut-syntaxes for perceived use cases, then the whole API starts becoming a lot more crowded and hard to learn. Its already huge, and the direction is always one of having an open ended set of constructs that work as consistently as possible. So here, you can certainly make a subclass of Query that has the convenience methods you're looking for, like a "join_and_load" type of method. -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.