Author: tfischer Date: Fri Feb 22 21:36:01 2013 New Revision: 1449222 URL: http://svn.apache.org/r1449222 Log: fix optimistic locking docs
Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/read-from-db.xml Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/read-from-db.xml URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/read-from-db.xml?rev=1449222&r1=1449221&r2=1449222&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/read-from-db.xml (original) +++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/orm-reference/read-from-db.xml Fri Feb 22 21:36:01 2013 @@ -986,12 +986,11 @@ BookPeer.doSelect(criteria); This could be due to the row being updated in the meantime by another process, or the row was deleted, or it never existed. </p> -<source> -Criteria criteria = new Criteria() - .where(BookPeer.BOOK_ID, 5) - .forUpdate(); -BookPeer.doSelect(criteria); -</source> + <p> + The mode <code>simpleSelect</code> can be chosen by setting the + template option <code>torque.om.optimisticLocking.mode</code> + to <code>selectForUpdate</code> when generating the om classes. + </p> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org