added an example that uses a discriminator column to distinguish between subclasses