From 52ff6e0ccc34004e97584a82f8544a1184adae8c Mon Sep 17 00:00:00 2001 From: Holash Chand Date: Fri, 21 Jun 2024 16:30:05 +0530 Subject: [PATCH] Fixed hard delete not working for redundant entity properties --- .../registry/service/impl/RegistryServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java b/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java index 989037820..682fb2775 100755 --- a/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java +++ b/java/registry/src/main/java/dev/sunbirdrc/registry/service/impl/RegistryServiceImpl.java @@ -483,7 +483,11 @@ private void doDelete(IRegistryDao registryDao, VertexReader vr, Set pre itemUuid = ArrayHelper.unquoteString(itemUuid); if (!updatedUuids.contains(itemUuid)) { // delete this item - registryDao.deleteEntity(uuidVertexMap.get(itemUuid)); + if(isHardDeleteEnabled) { + registryDao.hardDeleteEntity(uuidVertexMap.get(itemUuid)); + } else { + registryDao.deleteEntity(uuidVertexMap.get(itemUuid)); + } } } }