Should we remove the update method? It seems to only confuse people. It would break backward compatibility but only for broken apps. I do not think anybody really means to use update as designed (update the image of the record but not the record).
On Friday, 25 May 2012 14:56:37 UTC-5, Richard wrote: > > Sorry I don't think it will work... > > But update_record() may be what you are searching for instead of update() > : > http://web2py.com/books/default/chapter/29/6?search=compute#update_record > > try with update_record() instead with your update_images() function. > > Richard > > On Fri, May 25, 2012 at 3:52 PM, Richard Vézina < > [email protected]> wrote: > >> And if you do this : >> def update_images(): >> rows=db(db.image).select() >> for row in rows: >> row.update(title=row.title) >> row.compute=lambda r:THUMB(r['file']) >> db.commit() >> >> ? >> >> Richard >> >> >> On Fri, May 25, 2012 at 1:50 PM, peter <[email protected]>wrote: >> >>> I am using web2py 1.99.7 >>> >>> I have a compute as >>> >>> db.image.thumb.compute=lambda r:THUMB(r['file']) >>> >>> >>> I update the whole database >>> >>> def update_images(): >>> rows=db(db.image).select() >>> for row in rows: >>> row.update(title=row.title) >>> db.commit() >>> >>> >>> Yet, the computes have not occurred. >>> >>> Similarly if I edit a record and submit, no compute. Yet if I add a >>> record, the compute does take place. >>> >>> Anyone any ideas why? >>> >>> Thanks >>> Peter >>> >> >> >

