add support for multiple arguments to eagerload/eagerload_all

Issue #897 resolved
Former user created an issue

right now its required to put all eagerload/eagerload_all separate

ie. something like this:

Post.query.filter_by(id=1).options(eagerload('author'),eagerload('forum'),eagerlad_all('posts.author')).first()

i think it would help to have something like this:

Post.query.filter_by(id=1).options(eagerload_all('author', 'forum', 'posts.author')).first()

Comments (3)

  1. Former user Account Deleted

    an alternative would be something like:

    Post.query.filter_by(id=1).eagerload_all('author', 'forum', 'posts.author').first()
    
  2. Mike Bayer repo owner

    i might consider someday moving the various query.options() to just be regular methods, this is how it would have been done if we built the query as generative from scratch. im not as keen on having a multi-arged eagerload() method, we've done away with most of our *args based "convenience" methods a while back since they create a more cluttered interface.

  3. Log in to comment