]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- and fix the message that was the actual subject of [ticket:2063]
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 28 Mar 2011 01:14:06 +0000 (21:14 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 28 Mar 2011 01:14:06 +0000 (21:14 -0400)
lib/sqlalchemy/orm/dependency.py

index 023b3e07e27caeb20357e099a13fb01fca065e3a..44858fb8528a32ce73010cdf49a74db05dd3415c 100644 (file)
@@ -268,9 +268,15 @@ class DependencyProcessor(object):
                     })
             else:
                 raise exc.FlushError(
-                "Attempting to flush an item of type %s on collection '%s', "
-                "whose mapper does not inherit from that of %s." % 
-                (state.class_, self.prop, self.mapper.class_))
+                    'Attempting to flush an item of type '
+                    '%(x)s as a member of collection '
+                    '"%(y)s". Expected an object of type '
+                    '%(z)s or a polymorphic subclass of '
+                    'this type.' % {
+                        'x': state.class_,
+                        'y': self.prop,
+                        'z': self.mapper.class_,
+                    })
 
     def _synchronize(self, state, child, associationrow,
                                             clearkeys, uowcommit):