Search in sources :

Example 41 with MetaModel

use of com.axelor.meta.db.MetaModel in project axelor-open-suite by axelor.

the class MetaJsonFieldRepo method remove.

@Override
public void remove(MetaJsonField metaJsonField) {
    if (metaJsonField.getJsonModel() == null) {
        MetaModel metaModel = metaModelRepo.all().filter("self.fullName = ?1", metaJsonField.getModel()).fetchOne();
        Beans.get(StudioMetaService.class).trackingFields(metaModel, metaJsonField.getName(), "Field removed");
    }
    Beans.get(JsonFieldService.class).removeSelection(metaJsonField);
    super.remove(metaJsonField);
}
Also used : MetaModel(com.axelor.meta.db.MetaModel) StudioMetaService(com.axelor.studio.service.StudioMetaService) JsonFieldService(com.axelor.studio.service.JsonFieldService)

Aggregations

MetaModel (com.axelor.meta.db.MetaModel)41 MetaModelRepository (com.axelor.meta.db.repo.MetaModelRepository)12 AxelorException (com.axelor.exception.AxelorException)9 MetaField (com.axelor.meta.db.MetaField)9 ArrayList (java.util.ArrayList)8 Model (com.axelor.db.Model)7 Mapper (com.axelor.db.mapper.Mapper)6 IOException (java.io.IOException)6 Transactional (com.google.inject.persist.Transactional)5 List (java.util.List)5 App (com.axelor.apps.base.db.App)4 Property (com.axelor.db.mapper.Property)4 MetaJsonModel (com.axelor.meta.db.MetaJsonModel)4 Context (com.axelor.rpc.Context)4 AuditableModel (com.axelor.auth.db.AuditableModel)3 CSVInput (com.axelor.data.csv.CSVInput)3 MetaFile (com.axelor.meta.db.MetaFile)3 ActionViewBuilder (com.axelor.meta.schema.actions.ActionView.ActionViewBuilder)3 AppFilter (com.axelor.app.internal.AppFilter)2 AdvancedExport (com.axelor.apps.base.db.AdvancedExport)2