From 60d67c9fea99f79abafe528610dcfe3186a261ce Mon Sep 17 00:00:00 2001 From: Pahansith Date: Tue, 12 May 2020 17:57:40 +0530 Subject: [PATCH] Change method calling order --- .../carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java index d8e32ee294..786ee0b58a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java @@ -1912,6 +1912,7 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO { removeEnrollmentDeviceDetail(conn, enrollmentIds); removeEnrollmentDeviceLocation(conn, enrollmentIds); removeEnrollmentDeviceInfo(conn, enrollmentIds); + deleteLargePayloadRecords(conn, enrollmentIds); removeDeviceOperationResponse(conn, enrollmentIds); removeEnrollmentOperationMapping(conn, enrollmentIds); if (log.isDebugEnabled()) { @@ -2398,7 +2399,6 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO { private void removeDeviceOperationResponse(Connection conn, List enrollmentIds) throws DeviceManagementDAOException { try { - deleteLargePayloadRecords(conn, enrollmentIds); String sql = "DELETE FROM DM_DEVICE_OPERATION_RESPONSE WHERE ENROLMENT_ID = ?"; if (!executeBatchOperation(conn, sql, enrollmentIds)) { String msg = "Failed to remove device operation response of devices with enrollmentIds : "