Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

Multiple SQL select statements for JPQL select with multiple left
join fetch

Don T

2008-08-08

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi, when running a JPQL query for OpenJPA 1.0.2 with multiple left outer join
fetch clauses such as:

SELECT x FROM Magazine x left outer join fetch x.articles left outer join
fetch x.authors WHERE x.title = 'JDJ'

it seems multiple SQL select statements are executed, 1 for each join fetch
clause. Calling getResultList returns the result set of the last select
statement. In the above statement, for example, I see articles is null, but
authors is not null. Wondering if this is a known issue and if there are
workarounds?
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.