Hi,

just drop the 'inner' commit() and begin()s, as using one transaction across the complete loop should be just fine.

Kind Regards
Werner Guttmann

On 20.12.2012 00:48, olmec wrote:

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();


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to