openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Benson <jpbenson4...@winona.edu>
Subject Question pertaining to Large Result Set Proxies
Date Wed, 15 Aug 2007 00:33:43 GMT

I am a bit confused between the wording in the OpenJPA user guide and the
results I obtain when trying to use LRS proxies.

I have a collection, and I am trying to see if I can set different
properties on it.  The first being openjpa.FetchBatchSize=5 (set in the PU).

When I attempt this with the following code I get 20 as an output.

// Persist 20 EntityB entities. 
// Put them in the collection EntityB_LRS which is annotated LRS in EntityA.
// Persist EntityA
Query q = em.createQuery("select a from EntityA a");
List<EntityA> results = (List<EntityA>) queryA.getResultList();
Collection<EntityB> lrs = results.get(0).getEntityB_LRS();
System.out.println(lrs.size());

Shouldn't the size of the collection be 5?  I thought 5 more are added to
the lrs.iterator() after 5 next() calls?

I have similar questions for openjpa.jdbc.FetchDirection=reverse.  When I
get my lrs.iterator() it still has results in the forward direction.  I am
using a Derby driver, which I believe should support this JDBC 2.0
functionality.

How can I verify that the properties pertaining to OpenJPA's Large Result
Sets are being honored?  Are they hints for how OpenJPA should internally
use it's result sets, or are these properties something the end user (like
me) sees? If so, how?
-- 
View this message in context: http://www.nabble.com/Question-pertaining-to-Large-Result-Set-Proxies-tf4270462.html#a12154658
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Mime
View raw message