Hello! On Fri, Mar 16, 2007 at 12:33:49AM +0100, sophana wrote: > Yes it seems to work much better with commit(True).
Good. I will fix that. Thank you for testing! > Could you tell me a little more about how this works? what mean released > here? conn = conn.transaction() creates a new transaction object; the object acquires a new low-level connection from the pool and stores it; the low-level connection is removed from the pool; "releasing" means "return it to the pool". For single-threaded programs there is one connection in the pool. > Is it efficient? I mean, does it open a connection each time I make a > transaction? If the pool is empty a new low-level connection opened; if you have disabled pooling (by setting conn._pool = None) the connection will be closed instead of returning to the pool. > What about rollbacks? shoudn't they release the connection too? Or is it > always released? Yes. You can call as much .commit()'s, but after .rollback() you have to call .begin() to acquire a new low-level connection. The last .commit() should be called as .commit(True). Now you know why. > About caches, how is it possible that I don't have atomicity problems, > if the row instance is the same object between threads, how can > transactions work correctly if I don't get the same read value because > of a commit not done in another thread? .commit() expires the object from all caches, so on the next access the thread will redraw the object from DB. This doesn't work between processes, of course. (Seems like a good piece of documentation. Need to insert this into SQLObject.html...) > Isn't it a limit of the object relational mapper? What limit? Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss