You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2009/12/21 19:36:18 UTC
[jira] Created: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
----------------------------------------------------------------------
Key: OPENJPA-1440
URL: https://issues.apache.org/jira/browse/OPENJPA-1440
Project: OpenJPA
Issue Type: Improvement
Reporter: Pinaki Poddar
Assignee: Pinaki Poddar
SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
[1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Heath Thomann updated OPENJPA-1440:
-----------------------------------
Attachment: OPENJPA-1440-1.2.x.patch.txt
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0-beta
>
> Attachments: OPENJPA-1440-1.2.x.patch.txt
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Heath Thomann updated OPENJPA-1440:
-----------------------------------
Attachment: OPENJPA-1440-1.3.x.patch.txt
Added OPENJPA-1440-1.23.x.patch.txt for 1.2.x code and the OPENJPA-1440-1.3.x.patch.txt for 1.3.x code, as their names imply.
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0-beta
>
> Attachments: OPENJPA-1440-1.2.x.patch.txt, OPENJPA-1440-1.3.x.patch.txt
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Xiaoqin Feng (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794853#action_12794853 ]
Xiaoqin Feng commented on OPENJPA-1440:
---------------------------------------
I am on vacation from 12/20/2009 Â to 12/26/2009.
If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu.
For emergency, contact me at 925-209-5517.
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Heath Thomann updated OPENJPA-1440:
-----------------------------------
Attachment: OPENJPA-1440-1.2.x.patch.txt
OPENJPA-1440-1.3.x.patch.txt
Updated header per Pinaki.
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0-beta
>
> Attachments: OPENJPA-1440-1.2.x.patch.txt, OPENJPA-1440-1.3.x.patch.txt
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861018#action_12861018 ]
Pinaki Poddar commented on OPENJPA-1440:
----------------------------------------
Please correct the header on the TestCase attached with the patch.
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0-beta
>
> Attachments: OPENJPA-1440-1.2.x.patch.txt
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Heath Thomann updated OPENJPA-1440:
-----------------------------------
Attachment: (was: OPENJPA-1440-1.2.x.patch.txt)
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0-beta
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Heath Thomann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Heath Thomann updated OPENJPA-1440:
-----------------------------------
Attachment: (was: OPENJPA-1440-1.3.x.patch.txt)
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0-beta
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of
COUNT(t0.id) for simple queries as an option
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick updated OPENJPA-1440:
----------------------------------
Fix Version/s: 1.2.3
1.3.0
> Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option
> ----------------------------------------------------------------------
>
> Key: OPENJPA-1440
> URL: https://issues.apache.org/jira/browse/OPENJPA-1440
> Project: OpenJPA
> Issue Type: Improvement
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 1.2.3, 1.3.0, 2.0.0-beta
>
> Attachments: OPENJPA-1440-1.2.x.patch.txt, OPENJPA-1440-1.3.x.patch.txt
>
>
> SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT(*).
> However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in [1].
> OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
> [1] http://n2.nabble.com/COUNT-t-to-COUNT-tc4176827.html#a4176827
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.