Herwig Hochleitner | 5 Jun 23:21
Picon
Gravatar

transactions; cache sync behavior; sqlite3 relatet?

Hi!

Attached is a small code snippet highlighting some strange behavior.
It outputs:

Writing 'connection_val' to connection foo
Value of transaction foo: 'init'
Writing 'transaction_val' to transaction foo
Value of connection foo: 'connection_val'

Instead of the expected:

Writing 'connection_val' to connection foo
Value of transaction foo: 'connection_val'
Writing 'transaction_val' to transaction foo
Value of connection foo: 'connection_val'

Is this behavior intentional? (ie can I rely on it)
Is is sqlite3 related? (right now I can't test it on another DB)

How should I fix this?
.expire()? .sync()?
Invalidate the transaction's cache?

Caching behavior in sqlobject looks like some can worms to me.

regards
Herwig Hochleitner

Attachment (adhoc_test_transactions.py): text/x-python, 724 bytes
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Gmane