Collections work well when I check isEmpty(), but I'm not using that
notation. I'm still using eclipselink 2.3.2.
On Jan 22, 2015 1:04 PM, <karl.kil...@gmail.com> wrote:

> Hello! I think something is weird in eclipselink. I need to reproduce but
> if you do select item where supplier = selectedSupplier It is one select
> per item even if item only has a elementcollection with a few values...
>
> Seems any kind of collection is unusable. Thanks for your input
> Skickat från min iPhone
>
> > 22 jan 2015 kl. 14:20 skrev Andy Gumbrecht <agumbre...@tomitribe.com>:
> >
> > 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, karl.kil...@gmail.com 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
> >
>

Reply via email to