EntityResult entityResult = new EntityResult(MetadataHelper.getClassForName(eResult.getEntityClass().getName(), loader));
// Process the field results.
if (eResult.hasFieldResults()) {
for (FieldResultMetadata fResult : eResult.getFieldResults()) {
FieldResult fieldResult = new FieldResult(fResult.getName(), fResult.getColumn());
if (project.useDelimitedIdentifier()) {
fieldResult.getColumn().setUseDelimiters(true);
} else if (project.getShouldForceFieldNamesToUpperCase() && !fieldResult.getColumn().shouldUseDelimiters()) {
fieldResult.getColumn().useUpperCaseForComparisons(true);
}
entityResult.addFieldResult(fieldResult);
}
}