clarifying new behavior of positional parameters

Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/e8346f3a
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/e8346f3a
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/e8346f3a

Branch: refs/heads/master
Commit: e8346f3a86dfec04de415bf824b22fcad428647f
Parents: 9f92e34
Author: aadamchik <aadamc...@apache.org>
Authored: Sat Jan 24 10:56:45 2015 -0500
Committer: aadamchik <aadamc...@apache.org>
Committed: Sat Jan 24 10:56:45 2015 -0500

----------------------------------------------------------------------
 .../docbook/upgrade-guide/src/docbkx/new-features.xml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/e8346f3a/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
----------------------------------------------------------------------
diff --git a/docs/docbook/upgrade-guide/src/docbkx/new-features.xml 
b/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
index fc8f711..b2dcafd 100644
--- a/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
+++ b/docs/docbook/upgrade-guide/src/docbkx/new-features.xml
@@ -100,13 +100,15 @@
         </section>
         <section>
             <title>Positional Parameter Bindings </title>
-            <para>Expressions and SQLTemplate always supported binding of 
parameters by name as a
-                map. Cayenne 4.0 introduces a very easy form of positional 
bindings. It works with
-                the same named template format, only parameters are bound 
left-to-right,
-                disregarding the
-                names:<programlisting>// two distinct names, 3 positional 
parameters
+            <para>Expressions and SQLTemplate traditionally supported binding 
of parameters by name
+                as a map. Cayenne 4.0 introduces a very easy form of 
positional bindings. It works
+                with the same named template format, only parameters are bound 
by position,
+                left-to-right. Here we showing a more complex example with the 
same parameter name
+                beijg used more than once in the
+                query:<programlisting>// two distinct names, 3 positional 
parameters.
+// "price" is set to 23, "maxPrice" - to 50
 Expression e = ExpressionFactory.exp(
-     "price = $price or averagePrice = $price and maxPrice = $maxPrice", 23, 
25, 50);</programlisting>This
+     "price = $price or averagePrice = $price and maxPrice = $maxPrice", 23, 
50);</programlisting>This
                 API is supported in Expressions, SQLTemplate as well as new 
SQLSelect and can be
                 used interchnageably with named parameters with a single 
template flavor.</para>
         </section>

Reply via email to