make discriminator inherit parent model if their schemas are related.