>
> record = db(db.table_x.id == row_id).select().first()
> record['name'] = 'something else'
> record.update_record()
>
> That's the one way you cannot do it. The problem is when you call 
.update_record() with no arguments, it takes all the existing fields in the 
record and uses them in the database update. It will therefore use the 
existing values of modified_by and modified_on. Typically, modified_by and 
modified_on get updated because they are excluded from the update call, 
which prompts the DAL to fill their values in automatically. But this 
mechanism breaks down when calling .update_record() with no arguments. We 
should probably add a note about this in the book.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to