ref #8539 Update local data set after aggregation
authorpplitzner <p.plitzner@posteo.de>
Sun, 15 Sep 2019 13:06:39 +0000 (15:06 +0200)
committerpplitzner <p.plitzner@posteo.de>
Mon, 16 Sep 2019 04:46:24 +0000 (06:46 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixBottomToolbar.java

index a0968bd21d116ff5f83bd1dd8b3d17da3ac09a85..eb16cf4d79e428c679b5d789df3ec772a0d1c0e7 100644 (file)
@@ -205,6 +205,10 @@ public class CharacterMatrixBottomToolbar extends Composite{
                     MessagingUtils.errorDialog("Aggregation failed", this, "Aggregation was not successfull", TaxeditorEditorPlugin.PLUGIN_ID, (Exception)resultObject, true, true);
                 }
                 else if(resultObject instanceof UpdateResult){
+                    DescriptiveDataSet dataSet = (DescriptiveDataSet) ((UpdateResult) resultObject).getCdmEntity();
+                    dataSet = matrix.getCdmEntitiySession().load(dataSet, true);
+                    // update local dataset
+                    matrix.setDescriptiveDataSet(dataSet);
                     matrix.loadDescriptions(descriptiveDataSetUuid);
                 }
             } catch (InterruptedException e) {
@@ -251,9 +255,10 @@ public class CharacterMatrixBottomToolbar extends Composite{
                                         .stream().map(ex->ex.toString())
                                         .collect(Collectors.joining("\n"))));
                     }
-                    DescriptiveDataSet dataset = (DescriptiveDataSet) result.getCdmEntity();
+                    DescriptiveDataSet dataSet = (DescriptiveDataSet) result.getCdmEntity();
+                    dataSet = matrix.getCdmEntitiySession().load(dataSet, true);
                     // update local dataset
-                    matrix.setDescriptiveDataSet(dataset);
+                    matrix.setDescriptiveDataSet(dataSet);
                     matrix.loadDescriptions(descriptiveDataSetUuid);
                 }
             } catch (InterruptedException e) {