[jboss-cvs] JBossAS SVN: r102714 - projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Mar 22 03:15:36 EDT 2010
Author: laubai
Date: 2010-03-22 03:15:34 -0400 (Mon, 22 Mar 2010)
New Revision: 102714
Modified:
projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/collection_mapping.xml
projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/query_hql.xml
Log:
Added changes for JBPAPP-3945.
Modified: projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/collection_mapping.xml
===================================================================
--- projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/collection_mapping.xml 2010-03-22 07:14:55 UTC (rev 102713)
+++ projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/collection_mapping.xml 2010-03-22 07:15:34 UTC (rev 102714)
@@ -435,8 +435,7 @@
<para>
If your table does not have an index column, and you still wish to use <literal>List</literal>
as the property type, you can map the property as a Hibernate <emphasis><bag></emphasis>.
- A bag does not retain its order when it is retrieved from the database, but it can be
- optionally sorted or ordered.
+ A bag does not retain its order when it is persisted to the database, but it can be optionally sorted or ordered when it is retrieved from the database.
</para>
</section>
Modified: projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/query_hql.xml
===================================================================
--- projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/query_hql.xml 2010-03-22 07:14:55 UTC (rev 102713)
+++ projects/docs/enterprise/5.0.1/Hibernate/Hibernate_Core/en-US/query_hql.xml 2010-03-22 07:15:34 UTC (rev 102714)
@@ -188,11 +188,12 @@
inner join fetch cat.mate
left join fetch cat.kittens child
left join fetch child.kittens]]></programlisting>
-
+ <important>
+ <title>Limitations</title>
<para>
The <literal>fetch</literal> construct cannot be used in queries called using
<literal>iterate()</literal> (though <literal>scroll()</literal> can be used).
- <literal>Fetch</literal> should be used together with <literal>setMaxResults()</literal> or
+ <literal>Fetch</literal> should not be used together with <literal>setMaxResults()</literal> or
<literal>setFirstResult()</literal>, as these operations are based on the result rows which
usually contain duplicates for eager collection fetching, hence, the number of rows is not what
you would expect.
@@ -212,7 +213,7 @@
<programlisting><![CDATA[from Document fetch all properties order by name]]></programlisting>
<programlisting><![CDATA[from Document doc fetch all properties where lower(doc.name) like '%cats%']]></programlisting>
-
+ </important>
</section>
<section id="queryhql-joins-forms">
@@ -1140,7 +1141,7 @@
</para>
<programlisting><![CDATA[select usr.id, usr.name
-from User usr.name
+from User usr
join usr.messages msg
group by usr.id, usr.name
having count(msg) >= 1]]></programlisting>
More information about the jboss-cvs-commits
mailing list