(self, state: InstanceState[Any])
| 4142 | ) |
| 4143 | |
| 4144 | def _save_impl(self, state: InstanceState[Any]) -> None: |
| 4145 | if state.key is not None: |
| 4146 | raise sa_exc.InvalidRequestError( |
| 4147 | "Object '%s' already has an identity - " |
| 4148 | "it can't be registered as pending" % state_str(state) |
| 4149 | ) |
| 4150 | |
| 4151 | obj = state.obj() |
| 4152 | to_attach = self._before_attach(state, obj) |
| 4153 | if state not in self._new: |
| 4154 | self._new[state] = obj |
| 4155 | state.insert_order = len(self._new) |
| 4156 | if to_attach: |
| 4157 | self._after_attach(state, obj) |
| 4158 | |
| 4159 | def _update_impl( |
| 4160 | self, state: InstanceState[Any], revert_deletion: bool = False |
no test coverage detected