subClass = new UnionSubclass(parent, this.metadataBuildingContext);
}
else {
subClass = new SingleTableSubclass(parent, this.metadataBuildingContext);
Mapping subMapping = getMapping(sub);
<BUG>subClass.setDiscriminatorValue(subMapping != null && subMapping.getDiscriminator() != null ? subMapping.getDiscriminator() : fullName);
if (subMapping != null) {</BUG>
configureDerivedProperties(sub, subMapping);
}
}

subClass = new UnionSubclass(parent, this.metadataBuildingContext);
}
else {
subClass = new SingleTableSubclass(parent, this.metadataBuildingContext);
Mapping subMapping = getMapping(sub);
DiscriminatorConfig discriminatorConfig = subMapping != null ? subMapping.getDiscriminator() : null;
subClass.setDiscriminatorValue(discriminatorConfig != null && discriminatorConfig.getValue() != null ? discriminatorConfig.getValue() : fullName);
if (subMapping != null) {
configureDerivedProperties(sub, subMapping);
}
}
