]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
change exception message
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Jul 2006 16:33:46 +0000 (16:33 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Jul 2006 16:33:46 +0000 (16:33 +0000)
lib/sqlalchemy/orm/session.py

index 7508348241e9e5df3bb5e26577f6a0bbf3055a46..5bed7181cc78f15db6ae207c48c107fa6611c863 100644 (file)
@@ -266,7 +266,7 @@ class Session(object):
     def expunge(self, object):
         """removes the given object from this Session.  this will free all internal references to the object."""
         self.uow.expunge(object)
-            
+        
     def save(self, object, entity_name=None):
         """
         Adds a transient (unsaved) instance to this Session.  This operation cascades the "save_or_update" 
@@ -328,7 +328,7 @@ class Session(object):
     def _save_impl(self, object, **kwargs):
         if hasattr(object, '_instance_key'):
             if not self.uow.has_key(object._instance_key):
-                raise exceptions.InvalidRequestError("Instance '%s' is already persistent in a different Session" % repr(object))
+                raise exceptions.InvalidRequestError("Instance '%s' is a detached instance or is already persistent in a different Session" % repr(object))
         else:
             m = class_mapper(object.__class__, entity_name=kwargs.get('entity_name', None))
             m._assign_entity_name(object)