diff --git a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java index c059f1c9c..8d258fac5 100644 --- a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java +++ b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/dao/impl/OrgApplicationMgtDAOImpl.java @@ -71,15 +71,14 @@ public void addSharedApplication(String mainAppId, String ownerOrgId, String sha NamedJdbcTemplate namedJdbcTemplate = getNewTemplate(); try { - String shareWithAllChildrenValue = getShareWithAllChildrenValue(shareWithAllChildren); namedJdbcTemplate.withTransaction(template -> { template.executeInsert(INSERT_SHARED_APP, namedPreparedStatement -> { namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_MAIN_APP_ID, mainAppId); namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_OWNER_ORG_ID, ownerOrgId); namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SHARED_APP_ID, sharedAppId); namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SHARED_ORG_ID, sharedOrgId); - namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SHARE_WITH_ALL_CHILDREN, - shareWithAllChildrenValue); + namedPreparedStatement.setBoolean(DB_SCHEMA_COLUMN_NAME_SHARE_WITH_ALL_CHILDREN, + shareWithAllChildren); }, null, false); return null; }); @@ -212,13 +211,12 @@ public void updateShareWithAllChildren(String mainApplicationId, String ownerOrg boolean shareWithAllChildren) throws OrganizationManagementException { NamedJdbcTemplate namedJdbcTemplate = getNewTemplate(); try { - String shareWithAllChildrenValue = getShareWithAllChildrenValue(shareWithAllChildren); namedJdbcTemplate.withTransaction(template -> { template.executeInsert(UPDATE_SHARE_WITH_ALL_CHILDREN, namedPreparedStatement -> { namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_MAIN_APP_ID, mainApplicationId); namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_OWNER_ORG_ID, ownerOrganizationId); - namedPreparedStatement.setString(DB_SCHEMA_COLUMN_NAME_SHARE_WITH_ALL_CHILDREN, - shareWithAllChildrenValue); + namedPreparedStatement.setBoolean(DB_SCHEMA_COLUMN_NAME_SHARE_WITH_ALL_CHILDREN, + shareWithAllChildren); }, null, false); return null; }); diff --git a/pom.xml b/pom.xml index e5ecd077a..a6b7fba7b 100644 --- a/pom.xml +++ b/pom.xml @@ -531,7 +531,7 @@ [1.0.1, 2.0.0) [4.7.0, 5.0.0) - 2.0.13 + 2.1.6 [2.0.0,3.0.0) 1.4.47