Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support nested sqlalchemy transactions #1

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

aadis commented Aug 8, 2013

Currently the session.begin_nested() and session.commit() pattern does not work.

This allows using subtransactions. In my (limited) testing it seems to work.

aadis commented Nov 26, 2013

Still waiting

Contributor

lrowe commented Nov 26, 2013

Apologies for the delay in getting to this.

The intended mechanism to trigger a subtransaction with zope.sqlalchemy is to use transaction.savepoint(). This ensures that other data managers participating in the transaction will also have their data rolled back to the same point.

Clearly that won't work when integrating existing code that uses session.begin_nested(), so I think this would be best to make this an option like keep_session. We'll also need a test for this feature.

@lrowe lrowe closed this in f0a4204 Jan 6, 2014

Contributor

lrowe commented Jan 6, 2014

On reconsidering, adding additional configuration around this isn't really warranted.

aadis commented Jan 7, 2014

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment