What I read about the commit/rollback "wrapping" that web2py does, it doesn't seem to solve my problem.
Let me explain. I have 3 tables (sn_counter, wo_counter and wo). The procedure I must do is the following: 1. Get the record from wo_counter table a extract the counter value (read operation), let's suppose I get the number 10. 2. Increase the counter to 11 and update the wo_counter record. 3. Get the record from sn_counter table a extract the counter value (read operation), let's suppose I get the number 20. 4. Increase the counter to 21 and update the sn_counter record. 5. Write a new record in the wo table with the original counters (10 and 20). During all these operations, no one can write to any of the 2 records used in steps 1 to 4. I don't think the existing commit/rollback does that. Does it? quinta-feira, 21 de Março de 2019 às 01:02:24 UTC, Leonel Câmara escreveu: > > Web2py always "wraps" your controller functions in a db transaction, so > yes, you can do that with any database which has transactions correctly > implemented. You don't need to worry about doing it manually. -- 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.

