yah, "nest_transactions" i hadnt realized i even placed there. its not implemented; it would involve a little bit of twiddling in the begin()/commit() methods to have each nested "commit()" actually do something, but its not that hard (might want to add a ticket for it to be implemented, or if youd like to take a shot at it ill gladly accept a patch...)

you can right now use an outermost begin() and a commit() to make a commit happen, or if youre not using begin() at all, each commit() will just commit everything as you go.

but it seems like you might just be looking for this:

        objectstore.commit(myobj, [myobj2, [myobj3]..])

when arguments are present, commit() will commit 'myobj' at once, no matter what is going on and regardless of any session transactions in progress.


On Mar 9, 2006, at 6:19 PM, James Harris wrote:

Hello fellow Alchemists,

I'm wondering if there is a way to have SQLAlchemy execute queries as
soon as mapped attributes are modified, instead of aggregating them
until a objectstore.commit().  I would still like to contain these
queries within a database transaction.

The problem occurs when some attributes are modified on one object, and
then a query is performed that does not have access to the new values.

I noticed there is an argument to the 'Session' class named
'nest_transactions'. The description leads me to believe it may help
with what I want to do although it doesn't appear that it actually does
anything.

If anybody can show me a way to achieve this, or can perhaps point me
towards something I've missed it would be much appreciated.

Thanks,
James



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel? cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to