You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by to...@db.apache.org on 2005/02/06 01:58:15 UTC
[DB Torque Wiki] Updated: TutorialErrata
Date: 2005-02-05T16:58:14
Editor: JimRoycroft
Wiki: DB Torque Wiki
Page: TutorialErrata
URL: http://wiki.apache.org/db-torque/TutorialErrata
no comment
Change Log:
------------------------------------------------------------------------------
@@ -4,3 +4,24 @@
----
+The example at the bottom of the Peers Howto (On Criterion) should probably read like this:
+
+<code>
+
+Criteria crit = new Criteria();
+
+Criteria.Criterion a1 = crit.getNewCriterion(ABC.A, new Integer(1), Criteria.LESS_THAN);
+
+Criteria.Criterion b2 = crit.getNewCriterion(ABC.B, new Integer(2), Criteria.GREATER_THAN);
+
+Criteria.Criterion a5 = crit.getNewCriterion(ABC.A, new Integer(5), Criteria.GREATER_THAN);
+
+Criteria.Criterion b3 = crit.getNewCriterion(ABC.B, new Integer(3), Criteria.LESS_THAN);
+
+crit.add(a1.and(b2).or(a5.and(b3)));
+
+</code>
+
+Note the conversion from int to Object in the Criterion. - JR (my first edit!)
+
+----
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org