db.begin();
while ( results.hasMore() ){
product = (model.objects.Product)results.next();
if(product.getUrl() == null) {
product.setUrl(product.getCaption());
}
if(UrlInUse(product.getUrl()) {
product.setUrl(product.getUrl() + product.getProductId());
}
db.commit();
db.begin();
}
db.commit();
--
View this message in context:
http://old.nabble.com/how-to-loop-object-result-set-and-update-while-checking-against-earlier-updated-object-tp34817543p34817588.html
Sent from the Castor - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email