Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 68610 invoked from network); 26 Apr 2010 19:26:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Apr 2010 19:26:56 -0000 Received: (qmail 91013 invoked by uid 500); 26 Apr 2010 19:26:55 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 90977 invoked by uid 500); 26 Apr 2010 19:26:55 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 90969 invoked by uid 99); 26 Apr 2010 19:26:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 19:26:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Apr 2010 19:26:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3QJQVKx012525 for ; Mon, 26 Apr 2010 19:26:32 GMT Message-ID: <28583295.15411272309991947.JavaMail.jira@thor> Date: Mon, 26 Apr 2010 15:26:31 -0400 (EDT) From: "Heath Thomann (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1440) Allow COUNT(*) instead of COUNT(t0.id) for simple queries as an option In-Reply-To: <591101091.1261420578497.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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.