summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/mapping/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-03-22 01:16:16 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-03-22 01:16:16 +0000
commit4f39c956da1a877e05b2d201dd8e756d9d39b7c2 (patch)
tree2e7f3483f616fb7e53def17d7fefb103d7d13d0a /lib/sqlalchemy/mapping/mapper.py
parent38594ca1e17fc835da55afad19e34e141ba17b4d (diff)
downloadsqlalchemy-4f39c956da1a877e05b2d201dd8e756d9d39b7c2.tar.gz
added "nest_on" option for Session, so nested transactions can occur mostly at the Session level,
fixes [ticket:113]
Diffstat (limited to 'lib/sqlalchemy/mapping/mapper.py')
-rw-r--r--lib/sqlalchemy/mapping/mapper.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/mapping/mapper.py b/lib/sqlalchemy/mapping/mapper.py
index a46064e6f..5e0f25738 100644
--- a/lib/sqlalchemy/mapping/mapper.py
+++ b/lib/sqlalchemy/mapping/mapper.py
@@ -350,6 +350,8 @@ class Mapper(object):
"""returns a proxying object to this mapper, which will execute methods on the mapper
within the context of the given session. The session is placed as the "current" session
via the push_session/pop_session methods in the objectstore module."""
+ if objectstore.get_session() is session:
+ return self
mapper = self
class Proxy(object):
def __getattr__(self, key):