mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
modified PolicyDAOImpl to fix PolicyRemove error occured by a database Foriegn Key Reference
This commit is contained in:
parent
b5a6280c8d
commit
9c7ebdafdb
@ -1282,6 +1282,11 @@ public class PolicyDAOImpl implements PolicyDAO {
|
||||
stmt.setInt(1, policyId);
|
||||
stmt.executeUpdate();
|
||||
|
||||
String deleteComplianceStatus ="DELETE FROM DM_POLICY_COMPLIANCE_STATUS WHERE POLICY_ID =?";
|
||||
stmt = conn.prepareStatement(deleteComplianceStatus);
|
||||
stmt.setInt(1, policyId);
|
||||
stmt.executeUpdate();
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Policy (" + policyId + ") related configs deleted from database.");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user