On 17.08.09 16:24, Maric Michaud wrote:
robert rottermann a écrit :
I do not see any reference to mark_changed you have to call it before any transaction.commit() to tell the zope transaction machinery that it has to commit you changes also. robert
In fact, what I understood is that zope.sqlalchemy, by default, bypasses the commit if status is not manually set as 'changed' (see the docstring I quoted in my previous mail). The alternative is to build the SessionExtension with initial_state == STATUS_INVALIDATED.
My point is that it should be the default for a DA, as it is intended to be used mainly by zsql methods which doesn't do nothing to the transaction state.
As author of SQLAlchemyDA I would assume that the transaction integration works out-of-the-box with Zope - however I have tested SQLAlchemyDA with the latest zope.sqlalchemy/SQLAlchemy versions. SQLAlchemy together with the underlying z3c.sqlalchemy/zope.sqlalchemy works with the latest Zope versions in various projects out-of-the-box using Zope 2.11. There is one project that required a special extension_options={'initial_state':STATUS_CHANGED}, parameter (used for the scoped_session(extension=ZopeTransactionExtension(**extension_options)) call). Not sure if this is related to your issue. Andreas -- ZOPYX Ltd. & Co KG \ ZOPYX & Friends Charlottenstr. 37/1 \ The experts for your Python, Zope and D-72070 Tübingen \ Plone projects www.zopyx.com, info@zopyx.com \ www.zopyx.de/friends, friends@zopyx.de ------------------------------------------------------------------------ E-Publishing, Python, Zope & Plone development, Consulting