AbstractClassMetaData targetCmd = storeMgr.getOMFContext().getMetaDataManager().getMetaDataForClass(targetElementType, clr);
discriminatorValue = targetCmd.getInheritanceMetaData().getDiscriminatorMetaData().getValue();
}
ScalarExpression discrExpr = discriminatorMapping.newScalarExpression(stmt, discriminatorTableExpr);
ScalarExpression discrVal = discriminatorMapping.newLiteral(stmt, discriminatorValue);
stmt.andCondition(discrExpr.eq(discrVal));
}
if (withMetadata == null || withMetadata.booleanValue())
{
// Select NUCLEUS_TYPE if required