use of com.axelor.meta.db.MetaSelect in project axelor-open-suite by axelor.
the class AdvancedExportServiceImpl method checkSelectionField.
private void checkSelectionField(String[] fieldName, int index, MetaModel metaModel) throws ClassNotFoundException {
Class<?> klass = Class.forName(metaModel.getFullName());
Mapper mapper = Mapper.of(klass);
List<MetaSelect> metaSelectList = metaSelectRepo.all().filter("self.name = ?", mapper.getProperty(fieldName[index]).getSelection()).fetch();
if (CollectionUtils.isNotEmpty(metaSelectList)) {
isSelectionField = true;
String alias = "self";
msi++;
mt++;
if (!isNormalField && index != 0) {
alias = aliasName;
}
addSelectionField(fieldName[index], alias, StringTool.getIdListString(metaSelectList));
}
}
Aggregations