- changed status to resolved
before_flush() sucks
Issue #1128
resolved
-
needs a simple "reentrant" blocker so that autoflush on lazyload is blocked throughout the execution of
session.flush()
-
the reentrant blocker should raise an error for an explicit userland call to
session.flush()
. -
the "new", "dirty" and "deleted" lists need to be (re-)calculated after the
before_flush()
method executes, geez... i.e.dirty = self._dirty_states
... (check for nothing dirty) ...
now we're flushing
flush_context = UOWTransaction(self)
if self.extension is not None: self.extension.before_flush(self, flush_context, objects)
# recalculate ! dirty = self._dirty_states
now get these
deleted = set(self._deleted) new = set(self._new)
dirty = set(dirty).difference(deleted)
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.5.0 (automated comment)
- Log in to comment
1b65c7eed5166d07cc145063f828beeb1d14cf02