EOJoin currentJoin = (EOJoin) joins.objectAtIndex(i);
String left = leftAlias + "." + sqlStringForSchemaObjectName(currentJoin.sourceAttribute().columnName());
String right = rightAlias + "." + sqlStringForSchemaObjectName(currentJoin.destinationAttribute().columnName());
joinStrings.addObject(left + " = " + right);
}
jc.joinCondition = " ON " + joinStrings.componentsJoinedByString(" AND ");
if (!_alreadyJoined.containsObject(jc)) {
_alreadyJoined.insertObjectAtIndex(jc, 0);
return jc.toString();
}
return null;