summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-07-10 21:32:34 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-07-10 21:32:34 +0000
commitd89b81a1d9dd85e3dce3512643e9a077d60a2d44 (patch)
treed471a340fa56ea6fcbc58b5f26f18315b125ec6d
parentd1ea19edb0248ed63dac71abaff8f7283b860a04 (diff)
downloadsqlalchemy-d89b81a1d9dd85e3dce3512643e9a077d60a2d44.tar.gz
fix to error message for object with mismatched session
-rw-r--r--lib/sqlalchemy/orm/unitofwork.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py
index 92cf825d5..cda99a902 100644
--- a/lib/sqlalchemy/orm/unitofwork.py
+++ b/lib/sqlalchemy/orm/unitofwork.py
@@ -143,7 +143,7 @@ class UnitOfWork(object):
"""validates that dirty/delete/flush operations can occur upon the given object, by checking
if it has an instance key and that the instance key is present in the identity map."""
if hasattr(obj, '_instance_key') and not self.identity_map.has_key(obj._instance_key):
- raise InvalidRequestError("Detected a mapped object not present in the current thread's Identity Map: '%s'. Use objectstore.import_instance() to place deserialized instances or instances from other threads" % repr(obj._instance_key))
+ raise InvalidRequestError("Detected a mapped object not present in this Session's identity map: '%s'. Use session.merge() to place deserialized instances or instances from other threads" % repr(obj._instance_key))
def update(self, obj):
"""called to add an object to this UnitOfWork as though it were loaded from the DB,