Hi Karl,
Firstly ....Ouch, I know it is always tempting to use things like this
but I would not use it unless there was a really really good reason to
use it. It is not compatible with anything other than EL.
If your child objects start to become so many that you are thinking of
batching the load then opt for a 'fetch = FetchType.LAZY' instead. This
means you would need to add an additional method to your service layer
to get the child objects. This is basically how you'd do it using JDBC too.
final Parent p = service.getParent(long id);
//List<Child> lc = p.getChildren(); <-- Hundreds of children, but null
list here if lazy loaded and detached...
List<Child> lc = service.getChildren(p);
If you still want to batch then do it manually:
List<Child> lc = service.getChildren(p, start, end); //Pretty easy to
write your retrieval own loop here... eg. while !lc.isEmpty()
Andy.
On 21/01/2015 18:17, [email protected] wrote:
Hello! Those of You who use eclipselink have been a real help before. How do
you manage
http://eclipse.org/eclipselink/documentation/2.4/jpa/extensions/a_batchfetch.htm
You need this everywhere to get decent behavior but it cannot be configured
globally :(
Cheers
Skickat från min iPhone
--
Andy Gumbrecht
https://twitter.com/AndyGeeDe
http://www.tomitribe.com