From: <one...@us...> - 2002-11-24 10:55:29
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv19596/doc/reference/src Modified Files: manipulating_data.xml query_language.xml Log Message: documented fact that find() may now fetch scalar values Index: manipulating_data.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/manipulating_data.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** manipulating_data.xml 20 Nov 2002 10:27:48 -0000 1.27 --- manipulating_data.xml 24 Nov 2002 10:55:26 -0000 1.28 *************** *** 199,209 **** <para> ! Queries called using <literal>iterate()</literal> may specify a property of a class ! in the <literal>select</literal> clause. They may even call SQL aggregate functions. ! Properties or aggregates are considered "scalar" results. ! </para> ! <para> ! In the current version, <literal>Session.find()</literal> may not be used to return ! scalar results (it <emphasis>always</emphasis> returns entities). </para> --- 199,205 ---- <para> ! Queries may specify a property of a class in the <literal>select</literal> clause. ! They may even call SQL aggregate functions. Properties or aggregates are considered ! "scalar" results. </para> *************** *** 221,225 **** <programlisting><![CDATA[Iterator iter = sess.iterate( ! "select cat.type, cat.birthdate, cat.name from cat in class eg.DomesticCat");]]></programlisting> </sect2> --- 217,226 ---- <programlisting><![CDATA[Iterator iter = sess.iterate( ! "select cat.type, cat.birthdate, cat.name from cat in class eg.DomesticCat" ! );]]></programlisting> ! ! <programlisting><![CDATA[List list = sess.find( ! "select cat, cat.mate.name from cat in class eg.DomesticCat" ! );]]></programlisting> </sect2> *************** *** 355,362 **** pk.getKittens(), "select this.mate where this.color = eg.Color.BLACK" )]]></programlisting> - - <para> - However, filters are <literal>find()</literal>-style queries; you can't select scalar values. - </para> </sect2> --- 356,359 ---- Index: query_language.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/query_language.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** query_language.xml 19 Nov 2002 15:35:35 -0000 1.21 --- query_language.xml 24 Nov 2002 10:55:26 -0000 1.22 *************** *** 56,60 **** <para> ! For <literal>iterate()</literal> queries you may select any property (not just associations). </para> --- 56,60 ---- <para> ! You may select any property (not just associations): </para> *************** *** 72,78 **** <para> ! Queries called called using <literal>iterate()</literal> may return properties of value type ! and may even return aggregate functions of these properties. Collections may also appear inside ! aggregate functions in the <literal>select</literal> clause. </para> --- 72,77 ---- <para> ! 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 <literal>select</literal> clause. </para> |