On 30/06/10 1:27 PM, Gary Jarrel wrote:
> But it seems that results.get(n) always inflates the object and put it
> into a committed persistence state, hence the test fails.
Can't imagine how the get is doing that.
> Any way to stop the object from inflating when you access it's
> Persistence State.
If that is happening, then that might be a bug. Could you put logging in there to identify exactly when you see the SQL query inflating the record? Does it happen right after getPersistenceState()?
> I can see in the logs that the query has also changed to just select
> the object ID as follows:
>
> SELECT t0.role_id FROM role t0
Yes, that's exactly the point.
Also, your test is not right. An entire page of data will always be inflated at once. So items 0 and 1 in the first query with page size 2. Then 2 and 3 will be pulled together when you try to inflate record 2.
Ari
-- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
This archive was generated by hypermail 2.0.0 : Wed Jun 30 2010 - 03:48:34 UTC