ebean-orm-deprecated / ebean-querybean

Moved as a module into ebean.git repo
https://ebean.io/docs/query/query-beans
Apache License 2.0
9 stars 3 forks source link

ENH: Add fetch() as an alternative to fetchAll() for associated beans #27

Closed rbygrave closed 8 years ago

rbygrave commented 8 years ago

So we can use fetch()

    new QCustomer()
        // tune query
        .select(cust.name)
        .contacts.fetch()
        // predicates
        .findList();

rather than fetchAll()

    new QCustomer()
        // tune query
        .select(cust.name)
        .contacts.fetchAll()
        // predicates
        .findList();

As I think "fetchAll()" is a little bit confusing with the "All" there. We either fetch with specific properties or not (and so that becomes all properties) so I think these should both be "fetch()".