Enhancement 172 : ENHANCEMENT: +lazy ... control over lazy loading query into batch size, select and joins ...
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.2.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
01/11/2009
Updated 
01/11/2009
Type 
Enhancement
 
Attachments 
No attachments

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

 
Rob 01 Nov 09:35
As an example
Query<Order> query = Ebean.find(Order.class)
	.join("customer","+lazy(10) name, status")
	.join("customer.contacts");

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)
join customer.contacts
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.

Rob 01 Nov 09:36
The purpose:

The purpose of this feature is to give developers full control over the lazy loading behaviour.

Rob 01 Nov 09:36
Added to HEAD

This is now in HEAD.

Rob 02 Nov 12:09
Duplicate of #170

Duplicate of #170

woResponse

Upload a file