Skip to content

Commit 4022eb0

Browse files
review comments
1 parent 783744e commit 4022eb0

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</developers>
2424

2525
<properties>
26-
<revision>1.0.0-RC1</revision>
26+
<revision>1.6.2-SNAPSHOT</revision>
2727
<java.version>17</java.version>
2828
<maven.compiler.source>${java.version}</maven.compiler.source>
2929
<maven.compiler.target>${java.version}</maven.compiler.target>

sdm/src/main/java/com/sap/cds/sdm/service/handler/SDMServiceGenericHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,7 @@ private String fetchUPIDFromCQN(CqnSelect select, CdsEntity parentEntity) {
586586
JsonNode whereArray = secondLast.path("where");
587587

588588
// Get the actual key field names from the parent entity
589-
List<String> keyElementNames =
590-
parentEntity != null ? getKeyElementNames(parentEntity) : List.of("ID");
589+
List<String> keyElementNames = getKeyElementNames(parentEntity);
591590

592591
for (int i = 0; i < whereArray.size(); i++) {
593592
JsonNode node = whereArray.get(i);

sdm/src/test/java/integration/com/sap/cds/sdm/IntegrationTest_SingleFacet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ void testNAttachments_NewEntity() throws IOException {
21482148
response = api.saveEntityDraft(appUrl, entityName, srvpath, entityID4);
21492149
if (response.equals("Saved")) {
21502150
String expectedJson =
2151-
"{\"error\":{\"code\":\"500\",\"message\":\"Cannot upload more than 4 attachments as set up by the application\"}}";
2151+
"{\"error\":{\"code\":\"500\",\"message\":\"Maximum number of attachments reached in English\"}}";
21522152
ObjectMapper objectMapper = new ObjectMapper();
21532153
JsonNode actualJsonNode = objectMapper.readTree(check);
21542154
JsonNode expectedJsonNode = objectMapper.readTree(expectedJson);
@@ -2196,7 +2196,7 @@ void testUploadNAttachments() throws IOException {
21962196
System.out.println("Result message for attachment " + i + ": " + resultMessage);
21972197

21982198
String expectedResponse =
2199-
"{\"error\":{\"code\":\"500\",\"message\":\"Cannot upload more than 4 attachments as set up by the application\"}}";
2199+
"{\"error\":{\"code\":\"500\",\"message\":\"Maximum number of attachments reached in English\"}}";
22002200
if (resultMessage.equals(expectedResponse)) {
22012201
ObjectMapper objectMapper = new ObjectMapper();
22022202
JsonNode actualJsonNode = objectMapper.readTree(resultMessage);
@@ -2702,7 +2702,7 @@ void testCreateLinkFailure() throws IOException {
27022702
String errorMessage = json.getJSONObject("error").getString("message");
27032703
assertEquals("500", errorCode);
27042704
assertEquals(
2705-
"Cannot upload more than 4 attachments as set up by the application", errorMessage);
2705+
"Maximum number of attachments reached in English", errorMessage);
27062706
}
27072707
String response = api.saveEntityDraft(appUrl, entityName, srvpath, createLinkEntity);
27082708
if (!response.equals("Saved")) {

0 commit comments

Comments
 (0)