Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0256B90A9 for ; Thu, 2 Feb 2012 16:25:16 +0000 (UTC) Received: (qmail 46142 invoked by uid 500); 2 Feb 2012 16:25:15 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 46044 invoked by uid 500); 2 Feb 2012 16:25:15 -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 46008 invoked by uid 99); 2 Feb 2012 16:25:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 16:25:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 16:25:12 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B73CB1881ED for ; Thu, 2 Feb 2012 16:24:51 +0000 (UTC) Date: Thu, 2 Feb 2012 16:24:51 +0000 (UTC) From: "Albert Lee (Closed) (JIRA)" To: dev@openjpa.apache.org Message-ID: <649617184.3258.1328199891752.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (OPENJPA-478) Contradictory text in manual section 10.2.6. JPQL GROUP BY, HAVING 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-478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee closed OPENJPA-478. ------------------------------ Close issue in preparation for 2.2.0 release. > Contradictory text in manual section 10.2.6. JPQL GROUP BY, HAVING > ------------------------------------------------------------------ > > Key: OPENJPA-478 > URL: https://issues.apache.org/jira/browse/OPENJPA-478 > Project: OpenJPA > Issue Type: Bug > Components: docs > Affects Versions: 1.2.2, 2.1.0 > Environment: linux, firefox, etc.. > Reporter: Andy Schlaikjer > Assignee: Milosz Tylenda > Priority: Minor > Fix For: 2.2.0 > > > In section 10.2.6. JPQL GROUP BY, HAVING (http://openjpa.apache.org/docs/latest/manual/jpa_langref.html#jpa_langref_group) the last paragraph seems contradictory: > """ > If there is no GROUP BY clause and the HAVING clause is used, the result is treated as a single group, and the select list can only consist of aggregate functions. When a query declares a HAVING clause, it must always also declare a GROUP BY clause. > """ > The first sentences seems to imply that a query may incorporate a HAVING clause without a GROUP BY clause, but the second sentence indicates otherwise. > Looking at section 10.2.12 JPQL BNF (http://openjpa.apache.org/docs/latest/manual/jpa_langref.html#jpa_langref_bnf), it seems as though the BNF contradicts the last sentence: > """ > select_statement ::= select_clause from_clause [where_clause] [groupby_clause] [having_clause] [orderby_clause] > """ > otherwise the BNF would be something like this: > select_statement ::= select_clause from_clause [where_clause] [groupby_clause [having_clause]] [orderby_clause] -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira