migration fixes

(cherry picked from commit 0d9f3890af)
This commit is contained in:
Efstratios Giannopoulos 2024-10-10 10:46:24 +03:00 committed by CITE\dtziotzios
parent b7bd667486
commit f38b825033
1 changed files with 1 additions and 12 deletions

View File

@ -427,18 +427,7 @@ public class DatasetMigrationService {
propertyDefinitionFieldSetEntity.setItems(new ArrayList<>());
propertyDefinitionEntity.getFieldSets().put(currentFieldSet.getId().trim(), propertyDefinitionFieldSetEntity);
}
PropertyDefinitionFieldSetItemEntity propertyDefinitionFieldSetItemEntity;
if (this.conventionService.isListNullOrEmpty(propertyDefinitionFieldSetEntity.getItems())){
propertyDefinitionFieldSetItemEntity = new PropertyDefinitionFieldSetItemEntity();
propertyDefinitionFieldSetItemEntity.setFields(new HashMap<>());
propertyDefinitionFieldSetItemEntity.setOrdinal(SimpleFieldSetOrdinal);
propertyDefinitionFieldSetEntity.getItems().add(propertyDefinitionFieldSetItemEntity);
} else {
propertyDefinitionFieldSetItemEntity = propertyDefinitionFieldSetEntity.getItems().getFirst();
}
propertyDefinitionFieldSetItemEntity.setComment(comment);
propertyDefinitionFieldSetEntity.setComment(comment);
}
private FieldEntity buildField(Dataset item, org.opencdmp.commons.types.descriptiontemplate.FieldEntity currentField, Object propertyValue, Map<UUID, ReferenceTypeDefinitionEntity> referenceTypeDefinitionEntityMap, Map<ReferenceKey, ReferenceEntity> referenceMap, int ordinal, List<DescriptionReferenceEntity> createdDescriptionReferenceEntities, Map<TagKey, UUID> savedTagIdsByName, HashSet<UUID> existingTagIds){