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 ?