Return True if the given object was deleted within a session flush. This is regardless of whether or not the object is persistent or detached. .. seealso:: :attr:`.InstanceState.was_deleted`
(object_: object)
| 2090 | |
| 2091 | |
| 2092 | def was_deleted(object_: object) -> bool: |
| 2093 | """Return True if the given object was deleted |
| 2094 | within a session flush. |
| 2095 | |
| 2096 | This is regardless of whether or not the object is |
| 2097 | persistent or detached. |
| 2098 | |
| 2099 | .. seealso:: |
| 2100 | |
| 2101 | :attr:`.InstanceState.was_deleted` |
| 2102 | |
| 2103 | """ |
| 2104 | |
| 2105 | state = attributes.instance_state(object_) |
| 2106 | return state.was_deleted |
| 2107 | |
| 2108 | |
| 2109 | def _entity_corresponds_to( |
no outgoing calls