commit all attributes unconditionally. This is used after a flush() or a full load/refresh to remove all pending state from the instance. - all attributes are marked as "committed" - the "strong dirty reference" is removed - the "modified" flag is set to
(
self,
dict_: _InstanceDict,
instance_dict: Optional[IdentityMap] = None,
)
| 994 | del self.callables[key] |
| 995 | |
| 996 | def _commit_all( |
| 997 | self, |
| 998 | dict_: _InstanceDict, |
| 999 | instance_dict: Optional[IdentityMap] = None, |
| 1000 | ) -> None: |
| 1001 | """commit all attributes unconditionally. |
| 1002 | |
| 1003 | This is used after a flush() or a full load/refresh |
| 1004 | to remove all pending state from the instance. |
| 1005 | |
| 1006 | - all attributes are marked as "committed" |
| 1007 | - the "strong dirty reference" is removed |
| 1008 | - the "modified" flag is set to False |
| 1009 | - any "expired" markers for scalar attributes loaded are removed. |
| 1010 | - lazy load callables for objects / collections *stay* |
| 1011 | |
| 1012 | Attributes marked as "expired" can potentially remain |
| 1013 | "expired" after this step if a value was not populated in state.dict. |
| 1014 | |
| 1015 | """ |
| 1016 | self._commit_all_states([(self, dict_)], instance_dict) |
| 1017 | |
| 1018 | @classmethod |
| 1019 | def _commit_all_states( |