You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mt...@apache.org on 2011/03/19 20:36:05 UTC
svn commit: r1083258 -
/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml
Author: mtylenda
Date: Sat Mar 19 19:36:05 2011
New Revision: 1083258
URL: http://svn.apache.org/viewvc?rev=1083258&view=rev
Log:
OPENJPA-478: Get rid of contradictory text about HAVING without GROUP BY in user guide.
Modified:
openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml
Modified: openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml?rev=1083258&r1=1083257&r2=1083258&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/jpa_overview_query.xml Sat Mar 19 19:36:05 2011
@@ -3627,10 +3627,18 @@ that apply to grouping items.
<para>
If there is no <literal>GROUP BY</literal> clause and the <literal>HAVING
</literal> 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
-<literal>HAVING</literal> clause, it must always also declare a <literal>GROUP
-BY</literal> clause.
+select list can only consist of aggregate functions.
+The use of <literal>HAVING</literal> in the absence of
+<literal>GROUP BY</literal> is not required to be supported by a JPA implementation.
+Portable applications should not rely on <literal>HAVING</literal> without the use of
+<literal>GROUP BY</literal>.
</para>
+ <note>
+ <para>
+OpenJPA supports the use of <literal>HAVING</literal> in the absence of
+<literal>GROUP BY</literal> if the underlying database supports it.
+ </para>
+ </note>
<para>
Examples:
</para>