It almost works.
A small problem though : when I get and modify instances (a priori not
loaded before the flush) in after_flush method, they are correctly
added in the dirty list of the session but the 2nd flush does nothing.
This is because the identity_map is still flagged as 'not modified'
On
I was playing with SqlSoup in preparation to use it in a new (production)
project (sqlalchemy version 0.5.0beta3). I was testing with MySQL InnoDB
tables. The SqlSoup wiki page, and source code docstring, imply that a
SqlSoup.flush() will commit the data. I quickly realized that this is NOT
use before_flush() for changes to the dirty list and suchor if
you really want things set up for the *next* flush, use
after_flush_postexec().
On Aug 30, 2008, at 10:08 AM, GustaV wrote:
It almost works.
A small problem though : when I get and modify instances (a priori not
loaded
I planned to do it on the next flush as you said, but since it is not
very clean, I manage to do it in the before_flush method.
So, last message on that subject I think:
Since 'dirty' var is set before the call of 'before_flush' ( dirty =
self._dirty_states ); it doesn't take modification that
On Aug 30, 2008, at 1:55 PM, GustaV wrote:
I planned to do it on the next flush as you said, but since it is not
very clean, I manage to do it in the before_flush method.
So, last message on that subject I think:
Since 'dirty' var is set before the call of 'before_flush' ( dirty =