> > > Of course if you do > product.update_record(description = 'product description') > product.update_record(stock = 11) > product.update_record(code = 'abcfed') > queries will be 3, but your code is the one to blame. > > How do you imagine a "unit of work" pattern/algo in a DAL ? > > It is conceivable that multiple update records on a single entry be done, due to complex conditions (e.g. under certain conditions, you update stock but not description, etc.)
Since web2py either commits or rollbacks at the end of each request, all the works are done then. Therefore, it makes sense certain optimization can be done to reduce these 3 queries to only 1 query. --

