From d66490786cd733d0aa15905d5c45692dfe81ffbb Mon Sep 17 00:00:00 2001 From: Ankush Kumar Garg Date: Mon, 2 Feb 2026 16:06:07 +0530 Subject: [PATCH 1/2] Fix Setting the custom properties value to null doesn't revert the value in SDM --- pom.xml | 2 +- .../com/sap/cds/sdm/utilities/SDMUtils.java | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index eae584104..d5a84cfb9 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ - 1.7.1-SNAPSHOT + 1.0.0-RC1 17 ${java.version} ${java.version} diff --git a/sdm/src/main/java/com/sap/cds/sdm/utilities/SDMUtils.java b/sdm/src/main/java/com/sap/cds/sdm/utilities/SDMUtils.java index a40cb355c..2dcec79c9 100644 --- a/sdm/src/main/java/com/sap/cds/sdm/utilities/SDMUtils.java +++ b/sdm/src/main/java/com/sap/cds/sdm/utilities/SDMUtils.java @@ -186,7 +186,13 @@ public static Boolean checkMCM(HttpEntity responseEntity, List secondary public static void assembleRequestBodySecondaryTypes( MultipartEntityBuilder builder, Map requestBody, String objectId) { for (Map.Entry entry : requestBody.entrySet()) { - builder.addTextBody(entry.getKey(), entry.getValue(), ContentType.TEXT_PLAIN); + String value = entry.getValue(); + // If value is null, omit it (no update) + // If value is empty string, send it (clear the property in CMIS) + // For typed properties (int, date), CMIS will clear them if empty is sent + if (value != null) { + builder.addTextBody(entry.getKey(), value, ContentType.TEXT_PLAIN); + } } builder.addTextBody("objectId", objectId, ContentType.TEXT_PLAIN); @@ -332,9 +338,9 @@ public static Map getSecondaryPropertiesWithInvalidDefinition( title = titleAnnotation.get().getValue().toString(); } else { title = element.getName(); /* - * This is in case the user has not specified a title for the column in the cds - * file (which is optional) - */ + * This is in case the user has not specified a title for the column in the cds + * file (which is optional) + */ } invalidProperties.put(key, title); } @@ -524,7 +530,8 @@ public static String fetchUPIDFromCQN(CqnSelect select, CdsEntity parentEntity) whereArray = refArray; } - // If where condition is not present or empty, return null (valid scenario for select without + // If where condition is not present or empty, return null (valid scenario for + // select without // filter) if (whereArray == null || whereArray.isMissingNode() || whereArray.size() == 0) { return null; From d90b3209eb782de78de7a3375a1c9dc8e228039e Mon Sep 17 00:00:00 2001 From: Rishi Kunnath Date: Wed, 4 Feb 2026 09:39:19 +0530 Subject: [PATCH 2/2] Update project revision to 1.7.1-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a71a54c5b..13baf0765 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ - 1.0.0-RC1 + 1.7.1-SNAPSHOT 17 ${java.version} ${java.version}