Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé
Classe « SessionEvents »

Méthode sqlalchemy.orm.SessionEvents.after_attach

Signature de la méthode after_attach

def after_attach(self, session: 'Session', instance: '_O') -> 'None' 

Description

help(SessionEvents.after_attach)

Execute after an instance is attached to a session.

.. container:: event_signatures

     Example argument forms::

        from sqlalchemy import event


        @event.listens_for(SomeSessionClassOrObject, 'after_attach')
        def receive_after_attach(session, instance):
            "listen for the 'after_attach' event"

            # ... (event handling logic) ...


This is called after an add, delete or merge.

.. note::

   As of 0.8, this event fires off *after* the item
   has been fully associated with the session, which is
   different than previous releases.  For event
   handlers that require the object not yet
   be part of session state (such as handlers which
   may autoflush while the target object is not
   yet complete) consider the
   new :meth:`.before_attach` event.

.. seealso::

    :meth:`~.SessionEvents.before_attach`

    :ref:`session_lifecycle_events`



Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé