From ce0a7807b322f16b86090899b33160825fa9fd10 Mon Sep 17 00:00:00 2001 From: "Gamboa, Gilbert" Date: Thu, 18 Jul 2019 14:37:21 -0400 Subject: Fix error updating request_processing_data Fix error when updating existing record in request_processing_data table. Use correct field name in the toString method in RequestProcessingData bean class. RequestDbClient.updateRequestProcessingData should include entity id in the URI on the PUT request. Add new Config class ExposeEntityIdResourceConfiguration to make Spring data Rest return id in the response for RequestProcessingData. Make spring-boot-starter-data-rest not optional dependency in mso-requests-db-repositories Added unit test for RequestDbClient.updateRequestProcessingData() method. Issue-ID: SO-2120 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I733be06185e5c19a0b7112918ce0a0f2abf861d7 --- .../src/main/java/org/onap/so/db/request/client/RequestsDbClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mso-api-handlers/mso-requests-db/src/main/java') diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java index 7a24d14e9b..4d16d9c272 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java @@ -354,7 +354,7 @@ public class RequestsDbClient { public void updateRequestProcessingData(RequestProcessingData requestProcessingData) { HttpHeaders headers = getHttpHeaders(); - URI uri = getUri(requestProcessingDataURI); + URI uri = getUri(requestProcessingDataURI + "/" + requestProcessingData.getId()); HttpEntity entity = new HttpEntity<>(requestProcessingData, headers); restTemplate.put(uri, entity); } -- cgit 1.2.3-korg