PhpClass phpClass = PhpElementsUtil.getClassInterface(project, className);
// add root select fields
if(phpClass != null) {
qb.addPropertyAlias(entry.getValue(), new QueryBuilderPropertyAlias(entry.getValue(), null, new DoctrineModelField(entry.getValue()).addTarget(phpClass).setTypeName(phpClass.getPresentableFQN())));
List<QueryBuilderRelation> relationList = new ArrayList<QueryBuilderRelation>();
//qb.addRelation(entry.getValue(), attachRelationFields(phpClass));
for(DoctrineModelField field: EntityHelper.getModelFields(phpClass)) {
qb.addPropertyAlias(entry.getValue() + "." + field.getName(), new QueryBuilderPropertyAlias(entry.getValue(), field.getName(), field));
if(field.getRelation() != null && field.getRelationType() != null) {
relationList.add(new QueryBuilderRelation(field.getName(), field.getRelation()));
}
}