Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Batch hint

Hi,

I'm trying to select multiple objects in a query and apply the batching hint
to the query.  This fails at runtime with an illegal argument exception
because it is only applicable if you are returning 1 object.  My problem is
that the number of objects produced can be quite large and then as I iterate
over them, relationships are fetched one at a time which really bogs down. 
Is there a way to stipulate that the entity manager fetch associations for a
multi-object select?

Here is a sample of the query:

SELECT new MC(med1, med2)
FROM FM med1, FM med2
JOIN FETCH med1.nM JOIN FETCH med2.nM
LEFT JOIN FETCH med1.st LEFT JOIN FETCH med2.st
WHERE med1.mi = med2.mi

Thx Drew
-- 
View this message in context: http://www.nabble.com/Batch-hint-tp21489475p21489475.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top