(self, state: InstanceState[Any])
| 4298 | ) |
| 4299 | |
| 4300 | def _save_impl(self, state: InstanceState[Any]) -> None: |
| 4301 | if state.key is not None: |
| 4302 | raise sa_exc.InvalidRequestError( |
| 4303 | "Object '%s' already has an identity - " |
| 4304 | "it can't be registered as pending" % state_str(state) |
| 4305 | ) |
| 4306 | |
| 4307 | obj = state.obj() |
| 4308 | to_attach = self._before_attach(state, obj) |
| 4309 | if state not in self._new: |
| 4310 | self._new[state] = obj |
| 4311 | state.insert_order = len(self._new) |
| 4312 | if to_attach: |
| 4313 | self._after_attach(state, obj) |
| 4314 | |
| 4315 | def _update_impl( |
| 4316 | self, state: InstanceState[Any], revert_deletion: bool = False |
no test coverage detected