On Wednesday, June 28, 2017 at 4:28:32 PM UTC-4, Mike Bayer wrote:
>
> I'm not 100% sure that zope.sqlalchemy unconditionally emits COMMIT
> for the session that's associated. Though overall would need to see
> where you're getting request.session from and all that; if it's not
> associated with zope.sqlalchemy then you'd need to call
> session.commit() explicitly.
>
rephrasing Mike's reply slightly... as I (think I) know what's wrong now...
zope.sqlalchemy only knows that you did something with the session if you
use the ORM. you're using sqlalchemy core.
you need to do this:
from zope_sqlalchemy import mark_changed
mark_changed(session)
That will let zop.sqlalchemy know that you did something in the session and
it will vote a COMMIT. otherwise it thinks you did nothing.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.