summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/interfaces.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-07-15 14:54:37 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-07-15 14:54:37 +0000
commitaf38982273a67ba362d09bebae5e08b8593ce093 (patch)
tree73a6af7c76f4e20c51dc9b2862200229c45f7174 /lib/sqlalchemy/orm/interfaces.py
parent16e8d446866d5fc250fa287ea6881903661a00b0 (diff)
downloadsqlalchemy-af38982273a67ba362d09bebae5e08b8593ce093.tar.gz
- Added a new SessionExtension hook called after_attach().
This is called at the point of attachment for objects via add(), add_all(), delete(), and merge().
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
-rw-r--r--lib/sqlalchemy/orm/interfaces.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py
index 4cfc9462a..96a6e340c 100644
--- a/lib/sqlalchemy/orm/interfaces.py
+++ b/lib/sqlalchemy/orm/interfaces.py
@@ -301,6 +301,11 @@ class SessionExtension(object):
engine level transaction is begun on a connection.
"""
+ def after_attach(self, session, instance):
+ """Execute after an instance is attached to a session.
+
+ This is called after an add, delete or merge.
+ """
class MapperProperty(object):
"""Manage the relationship of a ``Mapper`` to a single class