doc subselects better

git-svn-id: https://svn.jboss.org/repos/hibernate/trunk/Hibernate3/doc@7488 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Gavin King 2005-07-15 05:13:36 +00:00
parent c62e4b6925
commit 545bb859b7
1 changed files with 13 additions and 5 deletions

View File

@ -840,7 +840,7 @@ order by count(kitten) asc, sum(kitten.weight) desc]]></programlisting>
</sect1> </sect1>
<sect1 id="queryhql-subqueries"> <sect1 id="queryhql-subqueries" revision="2">
<title>Subqueries</title> <title>Subqueries</title>
<para> <para>
@ -869,6 +869,13 @@ where cat.name not in (
select name.nickName from Name as name select name.nickName from Name as name
)]]></programlisting> )]]></programlisting>
<programlisting><![CDATA[select cat.id, (select max(kit.weight) from cat.kitten kit)
from Cat as cat]]></programlisting>
<para>
Note that HQL subqueries may occur only in the select or where clauses.
</para>
<para> <para>
For subqueries with more than one expression in the select list, you can use a tuple constructor: For subqueries with more than one expression in the select list, you can use a tuple constructor:
</para> </para>
@ -1022,12 +1029,13 @@ order by account.type.sortOrder, account.accountNumber, payment.dueDate]]></prog
</sect1> </sect1>
<sect1 id="queryhql-bulk"> <sect1 id="queryhql-bulk" revision="2">
<title>Bulk UPDATE &amp; DELETE Statements</title> <title>Bulk update and delete</title>
<para> <para>
HQL now supports UPDATE and DELETE statements in HQL. See HQL now supports <literal>update</literal>, <literal>delete</literal> and
<xref linkend="batch-direct"/> for details. <literal>insert ... select ...</literal> statements.
See <xref linkend="batch-direct"/> for details.
</para> </para>
</sect1> </sect1>