Massimo, I expect the correct way is: a) When inserting (sql insert) a new record: 1) was_inserted_on receives request.now contents (this is ok) 2) was_updated_on receives null
b) When updating (sql update) a record: 1) was_inserted_on doesn't change is value (this is ok) 2) was_update_on receives request.now What is happening here, with web2py 1.87.3 and SQLite: a) When inserting (sql insert) a new record: 1) was_inserted_on receives request.now content 2) was_updated_on receives request.now content b) When updating (sql update) a record: 1) was_inserted_on doesn't change its value 2) was_update_on doesn't change its value Am I loosing something? -- Vinicius Assef. On Mon, Nov 8, 2010 at 2:27 PM, mdipierro <[email protected]> wrote: > What you expect is correct and I cannot reproduce the problem. how do > you update the record? > > On Nov 8, 8:54 am, Vinicius Assef <[email protected]> wrote: >> I have this model just for test:http://pastebin.com/vF4VBLLM >> >> Field 'was_inserted_on' is working all right. It has default insert >> value and it isn't updated across record updates. It's ok. >> >> But 'was_updated_on' is working the same way. >> >> I imagined it was null when record is inserted and in every record >> update, it would be this column updated. >> >> At least, it was what I got from we2bpy manual in Record >> Representation section (DAL chapter). >> >> Where did I misunderstood? >> >> By the way, I solved that using compute in was_updated_on field and >> returning request.now. >> >> -- >> Vinicius Assef.

