>
> So if the computation needs two fields and only one is updated, it won't
>> execute on update. It makes sense when I rethink the logic, but I wouldn't
>> have thought of this right away. I recommend mentioning this explicitly in
>> the book.
>
>
Here's the DAL code:
http://code.google.com/p/web2py/source/browse/gluon/dal.py#7228
try:
new_fields.append((ofield,ofield.compute(Row(fields))))
except KeyError:
pass
So, it calls the compute function with whatever fields are submitted in the
update. If the compute function tries to access a field that's not
included, it will throw a KeyError, which will silently pass.
Anthony