})
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):