When a query uses setMaxRows etc it can't support fetch joins to *ToMany properties.
Currently those *ToMany joins are removed. We should now convert them over to query joins instead.
Query<Customer> query = Ebean.find(Customer.class) // this will automatically get converted to a // query join ... due to the maxRows .join("contacts")//, new JoinConfig().query()) .setMaxRows(5); List<Customer> list = query.findList();
<sql summary='Customer' > select c.id c0, c.status c1, c.name c2, c.smallnote c3, c.anniversary c4, c.cretime c5, c.updtime c6, c.billing_address_id c7, c.shipping_address_id c8 from o_customer c limit 6 </sql> <sql mode='+query' summary='Customer +many:contacts' load='path:contacts batch:100 actual:3' > select c.id c0 , cc.id c1, cc.first_name c2, cc.last_name c3, cc.phone c4, cc.mobile c5, cc.email c6, cc.cretime c7, cc.updtime c8, cc.customer_id c9 from o_customer c left outer join contact cc on cc.customer_id = c.id where c.id in (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) order by c.id </sql>
So there is a separate SQL query ... for the query join.
Fixed in HEAD.