This is related to Bug 239 which changed the implementation of a where clause predicate on a 'many' property (to filter the root results and not the 'many').
This change is the mechanism that allows a developer to filter the 'many' beans being fetched on a join (fetch join, query join or lazy join).
Note the filter on the orders... means we will only fetch the new orders made more recently than last week. It is a filter on the 'many' ... and not a filter on the 'root level' customers.
List<Customer> list = Ebean.find(Customer.class) // .join("orders", new JoinConfig().lazy()) // .join("orders", new JoinConfig().query()) .join("orders") .where().ilike("name","Rob%") .filterMany("orders") .eq("status", Order.Status.NEW) .gt("orderDate", lastWeek) .findList();
<sql summary='Customer +many:orders' > select c.id c0, c.status c1, c.name c2, ... , co.id c9, co.status c10, co.order_date c11, ... from o_customer c left outer join o_order co on co.kcustomer_id = c.id where lower(c.name) like ? and co.status = ? and co.order_date > ? order by c.id </sql>
So co.status = ? and co.order_date > ? ... are actually filtering the orders.
Fixed in HEAD.