Project

General

Profile

« Previous | Next » 

Revision 5c3feb25

Added by Patrick Plitzner about 4 years ago

Fix saving routine for descriptions

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java
169 169
    @Persist
170 170
    @Override
171 171
    public void save(IProgressMonitor monitor) {
172
        //save descriptions
173
        matrix.getDescriptions().stream()
174
        .filter(o->o instanceof RowWrapperDTO)
175
        .forEach(wrapper->save((RowWrapperDTO)wrapper));
172 176
        //save data set
173
        CdmStore.getService(IDescriptiveDataSetService.class).merge(descriptiveDataSet, true);
177
        CdmStore.getService(IDescriptiveDataSetService.class).merge(descriptiveDataSet);
174 178

  
175 179
        //save update results (taxon with aggregated description)
176 180
        if(updateResults!=null){
177 181
            updateResults.forEach(result->
178
            CdmStore.getService(result.getCdmEntity()).merge(result.getCdmEntity(), true));
182
            CdmStore.getService(result.getCdmEntity()).merge(result.getCdmEntity()));
179 183
        }
180 184

  
181 185
        conversation.commit();
......
184 188
    }
185 189

  
186 190
    private void save(RowWrapperDTO wrapper){
187
        CdmStore.getService(IDescriptionService.class).merge(wrapper.getSpecimenDescription(), true);
191
        CdmStore.getService(IDescriptionService.class).merge(wrapper.getSpecimenDescription());
188 192
    }
189 193

  
190 194
    @Focus

Also available in: Unified diff