Hi Gavin,
gavin wrote:
This is correct (and good) behavior.
Suppose I had 66 instances to load, and batch-size=50:
Batch 1: size 50
Batch 2: size 7
Batch 3: size 7
Batch 4: size 1
Batch 5: size 1
I looked at Hibernate 2.1.1 and 2.1.2 - it seems to me that it behaves slightly different compared to what you've said:
Setting Batchsize to 50 leads to the following batch size pattern:
Batch 1: size 7!!
Batch2: size 7
.....
So that means to be able to fetch 50 I must set batch-size to 50^2
But unfortunatly hibernate decides to fall back to default batch-size = 1, when batch-size is set too large (I tried 121 - it works so I am able to batch fetch 11 instances, but 225 fails....
It's areal problem for me because we have some huge object graphs to load! Shall I submit it to JIRA as bug?
Cheers,
Manuel