Update of /cvsroot/hibernate/Hibernate/doc/reference/html
In directory sc8-pr-cvs1:/tmp/cvs-serv4213/doc/reference/html
Modified Files:
query-language.html
Log Message:
property of component type may now appear in select clause
Index: query-language.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/query-language.html,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** query-language.html 24 Nov 2002 10:55:26 -0000 1.22
--- query-language.html 24 Nov 2002 15:45:50 -0000 1.23
***************
*** 22,26 ****
Actually, you may express this query more compactly as:
</p><pre class="programlisting">select cat.mate from cat in class eg.Cat</pre><p>You may even select collection elements:</p><pre class="programlisting">select cat.kittens.elements from cat in class eg.Cat</pre><p>
! You may select any property (not just associations):
</p><pre class="programlisting">select cat.name from cat in class eg.DomesticCat
where cat.name like 'fri%'</pre><p>
--- 22,26 ----
Actually, you may express this query more compactly as:
</p><pre class="programlisting">select cat.mate from cat in class eg.Cat</pre><p>You may even select collection elements:</p><pre class="programlisting">select cat.kittens.elements from cat in class eg.Cat</pre><p>
! Queries may return properties any value type including properties of component type:
</p><pre class="programlisting">select cat.name from cat in class eg.DomesticCat
where cat.name like 'fri%'</pre><p>
***************
*** 30,38 ****
from mother in class eg.DomesticCat, offspr in class eg.Cat
where offspr in mother.kittens.elements </pre><p>
! Queries may return properties of value type and may even return aggregate functions of these properties.
! Collections may also appear inside aggregate functions in the <tt>select</tt> clause.
! </p><pre class="programlisting">select cat.name, cat.mate.name from cat in class eg.Cat
!
! select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat)
from cat in class eg.Cat
--- 30,36 ----
from mother in class eg.DomesticCat, offspr in class eg.Cat
where offspr in mother.kittens.elements </pre><p>
! Queryies may even return aggregate functions of properties. Collections may also appear
! inside aggregate functions in the <tt>select</tt> clause.
! </p><pre class="programlisting">select avg(cat.weight), sum(cat.weight), max(cat.weight), count(cat)
from cat in class eg.Cat
|