[hibernate-commits] Hibernate SVN: r10491 - branches/Branch_3_2/Hibernate3/doc/reference/en/modules trunk/Hibernate3/doc/reference/en/modules
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Sun Sep 17 17:05:08 EDT 2006
Author: christian.bauer at jboss.com
Date: 2006-09-17 17:05:01 -0400 (Sun, 17 Sep 2006)
New Revision: 10491
Modified:
branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml
trunk/Hibernate3/doc/reference/en/modules/query_hql.xml
Log:
Documented HHH-1615
Modified: branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml
===================================================================
--- branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml 2006-09-17 15:25:26 UTC (rev 10490)
+++ branches/Branch_3_2/Hibernate3/doc/reference/en/modules/query_hql.xml 2006-09-17 21:05:01 UTC (rev 10491)
@@ -821,7 +821,7 @@
</para>
</sect1>
- <sect1 id="queryhql-grouping">
+ <sect1 id="queryhql-grouping" revision="1">
<title>The group by clause</title>
<para>
@@ -854,13 +854,17 @@
<programlisting><![CDATA[select cat
from Cat cat
join cat.kittens kitten
-group by cat
+group by cat.id, cat.name, cat.other, cat.properties
having avg(kitten.weight) > 100
order by count(kitten) asc, sum(kitten.weight) desc]]></programlisting>
<para>
Note that neither the <literal>group by</literal> clause nor the
<literal>order by</literal> clause may contain arithmetic expressions.
+ Also note that Hibernate currently does not expand a grouped entity,
+ so you can't write <literal>group by cat</literal> if all properties
+ of <literal>cat</literal> are non-aggregated. You have to list all
+ non-aggregated properties explicitly.
</para>
</sect1>
Modified: trunk/Hibernate3/doc/reference/en/modules/query_hql.xml
===================================================================
--- trunk/Hibernate3/doc/reference/en/modules/query_hql.xml 2006-09-17 15:25:26 UTC (rev 10490)
+++ trunk/Hibernate3/doc/reference/en/modules/query_hql.xml 2006-09-17 21:05:01 UTC (rev 10491)
@@ -821,7 +821,7 @@
</para>
</sect1>
- <sect1 id="queryhql-grouping">
+ <sect1 id="queryhql-grouping" revision="1">
<title>The group by clause</title>
<para>
@@ -854,13 +854,17 @@
<programlisting><![CDATA[select cat
from Cat cat
join cat.kittens kitten
-group by cat
+group by cat.id, cat.name, cat.other, cat.properties
having avg(kitten.weight) > 100
order by count(kitten) asc, sum(kitten.weight) desc]]></programlisting>
<para>
Note that neither the <literal>group by</literal> clause nor the
<literal>order by</literal> clause may contain arithmetic expressions.
+ Also note that Hibernate currently does not expand a grouped entity,
+ so you can't write <literal>group by cat</literal> if all properties
+ of <literal>cat</literal> are non-aggregated. You have to list all
+ non-aggregated properties explicitly.
</para>
</sect1>
More information about the hibernate-commits
mailing list