openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roger.keays" <roger.ke...@ninthavenue.com.au>
Subject Re: Programmatically pagination does NOT work with OpenJPA 1.0.1
Date Thu, 06 Dec 2007 06:08:48 GMT

same problem on postgres 7.4. broken in 1.0.1 but works in 1.0.0

will there be a 1.0.2 release to fix these sorts of things?

cheers,

rog

Marc Prud'hommeaux wrote:
> 
> Frank-
> 
> This sounds like something that was fixed in the trunk for revision  
> #584463:
> 
>   <http://svn.apache.org/viewvc?view=rev&revision=584463>
> 
> It was a fix for a problem introduced by
> <https://issues.apache.org/jira/browse/OPENJPA-378 
>  >.
> 
> The latest trunk snapshots don't have the bug, but the fix would need  
> to be backported to 1.0 branch if a fix is needed for that line.
> 
> Can you open a JIRA so we can track it?
> 
> 
> 
> On Nov 12, 2007, at 5:11 PM, frankca wrote:
> 
>>
>> I run a regression tests from 1.0.0 i.e. the tests work with 1.0.0.
>>
>> Look at the generated SQLs, it obviously missing the subquery using  
>> ROWNUM
>> (using Oracle DB).
>>
>> Here are the SQL stmts:
>> OpenJPA 1.0.1:
>>
>> SELECT t0.id AS c0, t0.version AS c1, t0.last_updated_by AS c2,
>> t0.last_updated_date AS c3, t1.id AS c4, t1.version AS c5,
>> t1.last_updated_by AS c6, t1.last_updated_date AS c7, t2.id AS c8,
>> t2.version AS c9, t2.last_updated_by AS c10, t2.last_updated_date AS  
>> c11,
>> t2.language AS c12, t2.name AS c13, t1.content AS c14, t3.id AS c15,
>> t3.version AS c16, t3.last_updated_by AS c17, t3.last_updated_date  
>> AS c18,
>> t3.name AS c19, t1.load_date AS c20, t4.id AS c21, t4.type AS c22,
>> t1.modified AS c23, t1.review_status AS c24, t1.title AS c25, t1.url  
>> AS c26,
>> t5.id AS c27, t5.version AS c28, t5.last_updated_by AS c29,
>> t5.last_updated_date AS c30, t5.name AS c31, t6.id AS c32,  
>> t6.version AS
>> c33, t6.last_updated_by AS c34, t6.last_updated_date AS c35, t6.name  
>> AS c36,
>> t7.id AS c37, t7.version AS c38, t7.last_updated_by AS c39,
>> t7.last_updated_date AS c40, t7.name AS c41, t0.byte_length AS c42,
>> t0.byte_offset AS c43, t0.text AS c44 FROM fact t0, document t1,  
>> collection
>> t2, data_source t3, mime_type t4, fact_rule t5, fact_type t6,  
>> fact_type t7
>> WHERE (t0.fact_type_fk = ? AND t0.document_fk = ?) AND  
>> t0.document_fk =
>> t1.id(+) AND t0.fact_rule_fk = t5.id(+) AND t0.fact_type_fk =  
>> t7.id(+) AND
>> t1.collection_fk = t2.id(+) AND t1.data_source_fk = t3.id(+) AND
>> t1.mime_type_fk = t4.id(+) AND t5.fact_type_fk = t6.id(+)  
>> [params=(long) 3,
>> (long) 2]
>>
>> OpenJPA 1.0.0:
>>
>> SELECT * FROM (SELECT r.*, ROWNUM RNUM FROM (SELECT t0.id AS c0,  
>> t0.version
>> AS c1, t0.last_updated_by AS c2, t0.last_updated_date AS c3, t1.id  
>> AS c4,
>> t1.version AS c5, t1.last_updated_by AS c6, t1.last_updated_date AS  
>> c7,
>> t2.id AS c8, t2.version AS c9, t2.last_updated_by AS c10,
>> t2.last_updated_date AS c11, t2.language AS c12, t2.name AS c13,  
>> t1.content
>> AS c14, t3.id AS c15, t3.version AS c16, t3.last_updated_by AS c17,
>> t3.last_updated_date AS c18, t3.name AS c19, t1.load_date AS c20,  
>> t4.id AS
>> c21, t4.type AS c22, t1.modified AS c23, t1.review_status AS c24,  
>> t1.title
>> AS c25, t1.url AS c26, t5.id AS c27, t5.version AS c28,  
>> t5.last_updated_by
>> AS c29, t5.last_updated_date AS c30, t5.name AS c31, t6.id AS c32,
>> t6.version AS c33, t6.last_updated_by AS c34, t6.last_updated_date  
>> AS c35,
>> t6.name AS c36, t7.id AS c37, t7.version AS c38, t7.last_updated_by  
>> AS c39,
>> t7.last_updated_date AS c40, t7.name AS c41, t0.byte_length AS c42,
>> t0.byte_offset AS c43, t0.text AS c44 FROM fact t0, document t1,  
>> collection
>> t2, data_source t3, mime_type t4, fact_rule t5, fact_type t6,  
>> fact_type t7
>> WHERE (t0.fact_type_fk = ? AND t0.document_fk = ?) AND  
>> t0.document_fk =
>> t1.id(+) AND t0.fact_rule_fk = t5.id(+) AND t0.fact_type_fk =  
>> t7.id(+) AND
>> t1.collection_fk = t2.id(+) AND t1.data_source_fk = t3.id(+) AND
>> t1.mime_type_fk = t4.id(+) AND t5.fact_type_fk = t6.id(+)) r WHERE  
>> ROWNUM <=
>> ?) WHERE RNUM > ? [params=(long) 3, (long) 2, (long) 5, (long) 2]
>>
>> -Frank
>>
>>
>>
>> Patrick Linskey-2 wrote:
>>>
>>> What SQL do you see? Is this a regression from 1.0.0, or something
>>> that you're running into for the first time?
>>>
>>> -Patrick
>>>
>>> On Nov 12, 2007 4:46 PM, frankca <frankca@gmail.com> wrote:
>>>>
>>>> Programmatically pagination does NOT work with OpenJPA 1.0.1 i.e.  
>>>> using
>>>> EntityManager.setFirstResult()/setMaxResults().
>>>>
>>>> Sorry, I don't have time to package a test case for now.
>>>>
>>>> -Frank
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Programmatically-pagination-does-NOT-work-with-OpenJPA-1.0.1-tf4795034.html#a13717713
>>>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> -- 
>>> Patrick Linskey
>>> 202 669 5907
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Programmatically-pagination-does-NOT-work-with-OpenJPA-1.0.1-tf4795034.html#a13717920
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Programmatically-pagination-does-NOT-work-with-OpenJPA-1.0.1-tf4795034.html#a14186916
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message