if original is NO_VALUE:
return list(current)
else:
+ # TODO: use the dict() of state, obj here
current_set = util.IdentitySet(current)
original_set = util.IdentitySet(original)
state,
key,
passive=PASSIVE_NO_INITIALIZE).sum()
+
+ TODO: we'd like to more closely merge the "history" tuple
+ generation with "get_all_pending()", making the presence
+ of the "History" object optional.
"""
# 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
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:
self.attributes[hashkey] = (history, state_history, passive)
else:
impl = state.manager[key].impl
+ # TODO: store the history as (state, object) tuples
+ # so we don't have to keep converting here
history = impl.get_history(state, state.dict, passive=passive)
if history and impl.uses_objects:
state_history = history.as_state()