-
Notifications
You must be signed in to change notification settings - Fork 877
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
Object persistence issue #3137
Comments
I haven't used the cookiecutter, but it looks as though its development.ini is lacking the zodb / tm configuration of the older scaffold. |
Never mind, those packages get pulled in via |
Right, Here's the
|
That configuration looks right: the Can you show the view code which invokes your |
Sure thing:
The object is getting created ok as far as I can see. But it is never persisted. Changing |
One thing to note is that the scaffold is not using the threadlocal transaction manager so anytime you edit it looks like pyramid_zodbconn would need support added to use an explicit transaction manager via [1] http://www.zodb.org/en/latest/guide/transactions-and-threading.html#explicit-transaction-managers |
I confirm that it's working without the |
Thanks @TWry - we should be able to release an updated version of pyramid_zodbconn that works with the non-threadlocal transaction managers but until then you'll need to use the global one. I'm moved this issue into Pylons/pyramid_zodbconn#6 |
See code below. I'd expect that the
add_event
method would automatically persist new events. That is not the case. I have to add a call to transaction.commit in order for this to work. The project has been set up from the cookiecutter template, pyramid version is 1.9.1. Any ideas what's going wrong here, please?The text was updated successfully, but these errors were encountered: