On 01.10.2013 09:08, Wichert Akkerman wrote:
But the transaction is not committed. I discovered that the transaction is 
committed only if I call add() on DBSession (all five shots are inserted then)…

That is expected behaviour: zope.sqlalchemy can only detect changes when you 
use the ORM. If you execute statements directly you need to tell 
zope.sqlalchemy explicitly that a change was made in the session. This is done 
via mark_changed:

   from zope.sqlalchemy import mark_changed
   mark_changed(DBSession())

For more information see the zope.sqlalchemy documentation at 
https://pypi.python.org/pypi/zope.sqlalchemy

...which cleary describes exactly my 'problem'. Guess I didn't see the forest for the trees. Thanks for pointing that out for me, Wichert!

Roman

--
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to