public Index getJoinIndex(FieldMapping field, boolean adapt) {
ForeignKey fk = field.getJoinForeignKey();
if (fk == null)
return null;
Index idx = null;
if (fk.getColumns().length > 0)
idx = field.getMappingRepository().getMappingDefaults().
getJoinIndex(field, fk.getTable(), fk.getColumns());
return createIndex(field, "join", idx, fk.getColumns(), adapt);
}