if (modelEntity == null || modelField == null) return fieldName;
// if this is a view entity and we are configured to alias the views, use the alias here instead of the composite (ie table.column) field name
if (datasourceInfo != null && datasourceInfo.aliasViews && modelEntity instanceof ModelViewEntity) {
ModelViewEntity modelViewEntity = (ModelViewEntity) modelEntity;
ModelAlias modelAlias = modelViewEntity.getAlias(fieldName);
if (modelAlias != null) {
return modelAlias.getColAlias();
}
}
String colName = getColName(modelField, fieldName);
if (includeTableNamePrefix && datasourceInfo != null) {