-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Errata
PostPosted: Fri Mar 06, 2009 6:59 am 
Beginner
Beginner

Joined: Wed Aug 22, 2007 5:53 am
Posts: 38
13.2.1 Prefetching data in batches

Quote:
<class name="User"
table="USERS"
batch-size="10">
...
</class>

The first statement that retrieves all Item objects is executed when you list() the
query. The next statement, retrieving three User objects, is triggered as soon as
you initialize the first proxy returned by allItems.get(0).getSeller(). This
query loads three sellers at once—because this is how many items the initial query
returned and how many proxies are uninitialized in the current persistence context.
You defined the batch size as “up to 10.” If more than 10 items are returned,
you see how the second query retrieves 10 sellers in one batch.


I think that the statement "This
query loads three sellers at once—because this is how many items the initial query returned " is incorrect..

Moreover the statement "You defined the batch size as “up to 10.” If more than 10 items are returned" also seems incorrect as we defined batch-size on User and not on item..

Is my understanding correct ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 06, 2009 7:32 am 
Beginner
Beginner

Joined: Wed Aug 22, 2007 5:53 am
Posts: 38
i got the answer.. Please don;t reply to this topic.. instead delete it..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.