Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nested sqlalchemy transactions #1

Closed
wants to merge 2 commits into from

Conversation

aadis
Copy link

@aadis 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
Copy link
Author

aadis commented Nov 26, 2013

Still waiting

@lrowe
Copy link
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
@lrowe
Copy link
Contributor

lrowe commented Jan 6, 2014

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

@aadis
Copy link
Author

aadis commented Jan 7, 2014

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants