A warning is emitted when trying to flush an object of an inherited
mapped class where the polymorphic discriminator has been assigned
to a value that is invalid for the class.   [ticket:2750]