if (fieldType != null && !fieldType.equals(mapping.getType()))
{
// The field relation is to a table that allows multiple types to be stored (and has a discriminator)
// and the type we want is not the base type, so we need to restrict the values of the discriminator.
DiscriminatorMetaData dismd = table.getDiscriminatorMetaData();
DiscriminatorMapping discriminatorMapping = (DiscriminatorMapping)table.getDiscriminatorMapping(false);
if (dismd != null && dismd.getStrategy() != DiscriminatorStrategy.NONE)
{
// Start with the required class
BooleanExpression discrExpr = booleanConditionForClassInDiscriminator(qs, fieldType, dismd, discriminatorMapping, te);