You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Oliver Ringel (JIRA)" <ji...@apache.org> on 2010/03/17 17:36:27 UTC

[jira] Created: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Using firstResult and maxResults in queries is not working properly
-------------------------------------------------------------------

                 Key: OPENJPA-1580
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 2.0.0-beta2
         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
            Reporter: Oliver Ringel


Hi again,
I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 

Here is the relevant part of the logging.

DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
[DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
[DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
[DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC

Both queries are identical. So my guess is once more the trouble comes from the query cache.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847032#action_12847032 ] 

Fay Wang commented on OPENJPA-1580:
-----------------------------------

Yes, this is again related to the cache. A patch will be posted soon.

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>         Attachments: openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846470#action_12846470 ] 

Fay Wang commented on OPENJPA-1580:
-----------------------------------

Sorry, i just found out your attached test case.

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>         Attachments: openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-1580:
----------------------------------

    Fix Version/s:     (was: 2.1.0)
                   2.0.0

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-1580.patch, openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846468#action_12846468 ] 

Fay Wang commented on OPENJPA-1580:
-----------------------------------

Hi Oliver, could you attache a test case or code snippet?

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>         Attachments: openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Oliver Ringel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Ringel updated OPENJPA-1580:
-----------------------------------

    Attachment: openjpa1580.tar

Here is the test case.

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>         Attachments: openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang resolved OPENJPA-1580.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1580.patch, openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang closed OPENJPA-1580.
-----------------------------


> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>             Fix For: 2.1.0
>
>         Attachments: OPENJPA-1580.patch, openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Fay Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fay Wang updated OPENJPA-1580:
------------------------------

    Attachment: OPENJPA-1580.patch

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>         Attachments: OPENJPA-1580.patch, openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-1580) Using firstResult and maxResults in queries is not working properly

Posted by "Oliver Ringel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12847387#action_12847387 ] 

Oliver Ringel commented on OPENJPA-1580:
----------------------------------------

Hi Fay, your patch fixed the bug. Thanks.

> Using firstResult and maxResults in queries is not working properly
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-1580
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1580
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta2
>         Environment: Ubuntu 9.10, Maven 2.2.1, Spring 3.0.1 
>            Reporter: Oliver Ringel
>         Attachments: OPENJPA-1580.patch, openjpa1580.tar
>
>
> Hi again,
> I try to implement a paged resultset using the firstResult and maxResults method of the Query class. It seems that this is not working as expected. 
> Here is the relevant part of the logging.
> DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 558185842 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> [DEBUG,Query,main] Executing query: select s from SimpleEntity s order by s.id
> [DEBUG,SQL,main] <t 2132679615, conn 651497704> executing prepstmnt 2094184728 SELECT LIMIT 0 2 t0.id, t0.version, t0.base, t0.street, t0.my_name FROM some_objects t0 ORDER BY t0.id ASC
> Both queries are identical. So my guess is once more the trouble comes from the query cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.