From 1b97a6c226cd14f6768a40e66f38c504716506b6 Mon Sep 17 00:00:00 2001 From: sgiannopoulos Date: Fri, 5 Jul 2024 18:10:53 +0300 Subject: [PATCH] migration fixes --- dmp-migration-tool/web/pom.xml | 6 +++--- .../eu/old/eudat/migration/DatasetMigrationService.java | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dmp-migration-tool/web/pom.xml b/dmp-migration-tool/web/pom.xml index 3aa56a473..f38c39ed8 100644 --- a/dmp-migration-tool/web/pom.xml +++ b/dmp-migration-tool/web/pom.xml @@ -39,17 +39,17 @@ org.opencdmp repositorydepositbase - 2.0.15 + 2.0.16 org.opencdmp file-transformer-base - 0.0.23 + 0.0.24 org.opencdmp common-models - 0.0.18 + 0.0.19 diff --git a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java index c7473824c..4bb901f26 100644 --- a/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java +++ b/dmp-migration-tool/web/src/main/java/eu/old/eudat/migration/DatasetMigrationService.java @@ -296,6 +296,8 @@ public class DatasetMigrationService { this.ensureDescriptionReferenceOrdinal(fieldSet, descriptionReferenceEntitiesMap, descriptionReferenceDataEntityById, ordinal); fieldSet.setOrdinal(ordinal); } + + fieldSetEntity.setItems(fieldSetEntity.getItems().stream().sorted(Comparator.comparingInt(PropertyDefinitionFieldSetItemEntity::getOrdinal)).toList()); } this.entityManager.flush();