#800 - ENH: Add query.fetchQuery() and query.fetchLazy() ... as nicer alternatives to FetchConfig use

This commit is contained in:
Robin Bygrave
2016-08-02 23:30:26 +12:00
parent b5d6c5f70b
commit 9d23c1d56e
4 changed files with 98 additions and 2 deletions
@@ -26,8 +26,10 @@ public class TestLazyLoadEmptyCollection extends BaseTestCase {
Ebean.save(c);
List<Customer> list = Ebean.find(Customer.class).fetch("contacts", new FetchConfig().query(0))
.fetch("contacts.notes", new FetchConfig().query(100)).findList();
List<Customer> list = Ebean.find(Customer.class)
.fetch("contacts", new FetchConfig().query(0))
.fetch("contacts.notes", new FetchConfig().query(100))
.findList();
for (Customer customer : list) {
List<Contact> contacts = customer.getContacts();