diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-17 13:59:24 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-17 13:59:24 -0500 |
| commit | ba964522e15da9062f5ed11e8bf55a0b5fb54693 (patch) | |
| tree | 47f7b5ea8027bd47f9d57181ae3ff7bf5c6beba4 /lib/sqlalchemy/orm/dependency.py | |
| parent | 0a6f79561517fb5a601ad18831aee70de2d14d00 (diff) | |
| download | sqlalchemy-ba964522e15da9062f5ed11e8bf55a0b5fb54693.tar.gz | |
- use get_all_pending in per_state_flush_actions(), but we'd like to
streamline get_history() in any case
Diffstat (limited to 'lib/sqlalchemy/orm/dependency.py')
| -rw-r--r-- | lib/sqlalchemy/orm/dependency.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index ab8045f69..39ea1db35 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -152,10 +152,8 @@ class DependencyProcessor(object): # detect if there's anything changed or loaded # by a preprocessor on this state/attribute. if not, # we should be able to skip it entirely. - sum_ = uow.get_attribute_history( - state, - self.key, - passive=True).sum() + sum_ = attributes.get_all_pending(state, state.dict, self.key) + if not sum_: continue @@ -177,9 +175,10 @@ class DependencyProcessor(object): if child_in_cycles: child_actions = [] - for child_state in sum_: - if child_state is None: + for child in sum_: + if child is None: continue + child_state = attributes.instance_state(child) if child_state not in uow.states: child_action = (None, None) else: |
