}
public void joinRelatedModels(MultiModelItem item, List<String> path) {
if (path.size() > 0) {
String fieldName = path.get(0);
ReferenceField currentField = (ReferenceField) item.getModelClass().getManager().getField(fieldName);
ModelClassBase referenceClass = currentField.getReferenceClass();
String referenceItemName = item.getName() + "." + fieldName;
if (!this.items.containsKey(referenceItemName)) {
this.ljoin(referenceClass, referenceItemName,
String.format("%s.%s", referenceItemName, currentField.getReferenceModelKey().getFieldName()),
String.format("%s.%s", item.getName(), fieldName));
}
joinRelatedModels(items.get(referenceItemName), path.subList(1, path.size()));
}
}