Enhance the query language to allow control over the lazy loading queries.
Specifically this allows developers to control the
- batch size
- select properties and joins
Query<Order> query = Ebean.find(Order.class)
.join("customer","+lazy(10) name, status")
This query will initially find orders but will not fetch the associated customers due to the +lazy.
The lazy load query will be:
find customer (name, status)
where id in (?,?,?,?,?,?,?,?,?,?)
That is, When a customer is lazy loaded 10 customers will be loaded (the batch size is 10) and the name and status are fetched as well as all the contacts for the customers.
The purpose of this feature is to give developers full control over the lazy loading behaviour.
This is now in HEAD.
Duplicate of #170