MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / deleted_to_persistent

Method deleted_to_persistent

lib/sqlalchemy/orm/events.py:2335–2348  ·  view source on GitHub ↗

Intercept the "deleted to persistent" transition for a specific object. This transition occurs only when an object that's been deleted successfully in a flush is restored due to a call to :meth:`.Session.rollback`. The event is not called under any other ci

(self, session: Session, instance: _O)

Source from the content-addressed store, hash-verified

2333
2334 @_lifecycle_event
2335 def deleted_to_persistent(self, session: Session, instance: _O) -> None:
2336 """Intercept the "deleted to persistent" transition for a specific
2337 object.
2338
2339 This transition occurs only when an object that's been deleted
2340 successfully in a flush is restored due to a call to
2341 :meth:`.Session.rollback`. The event is not called under
2342 any other circumstances.
2343
2344 .. seealso::
2345
2346 :ref:`session_lifecycle_events`
2347
2348 """
2349
2350 @_lifecycle_event
2351 def deleted_to_detached(self, session: Session, instance: _O) -> None:

Callers 2

_update_implMethod · 0.80

Calls

no outgoing calls