This one time, at band camp, Peter Jeszenszky said:
PJ>Is it possible to execute an OQL query so that the returned
PJ>objects are read-only? I can not find an accessMode attribute
PJ>like the one that can be passed to method db.load(...).
Peter,
The quickest method of executing a query as read-only is like so:
productOql = db.getOQLQuery( "SELECT p FROM myapp.Product p WHERE p.id = $1" );
productOql.bind( 123 );
results = productOql.execute( Database.ReadOnly );
See the Javadoc for Database
(http://www.castor.org/javadoc/org/exolab/castor/jdo/Database.html#field_summary).
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev