Anthony, I understand that. If set.update() updates data on a collection of records, row.update() should update data in just one record. It makes more sense to me.
Web2py newcomers think about using row.update() to update data on db. It's is a trick, in my oppinion. Aftwards, Row represents a row in a table. On Thu, Nov 17, 2011 at 8:45 PM, Anthony <[email protected]> wrote: > On Thursday, November 17, 2011 4:19:16 PM UTC-5, viniciusban wrote: >> >> I'm saying that: >> row.update() doesn't alter database contents, as set.update() does. >> >> Same verb, different behaviour. > > Why should it have the same behavior -- it's the same verb, but operating on > instances of different classes? row.update() does what you would expect -- > it updates the Row object. Note, a Row object (as well as a Rows object) > does not merely reference a record in the db -- it is actually a copy of the > data from the db, converted to a Python object. A Set, on the other hand, > merely represents records in the db, so it makes sense that set.update() > would update the db record itself. > Anthony

