Merge pull request 'Fix added for loading device groups' (#228) from prathabanKavin/device-mgt-core:sqldevicegroupfix into master

Reviewed-on: #228
pull/233/head
commit 0068a26b58

@ -57,7 +57,7 @@ public class SQLServerGroupDAOImpl extends AbstractGroupDAOImpl {
try { try {
Connection conn = GroupManagementDAOFactory.getConnection(); Connection conn = GroupManagementDAOFactory.getConnection();
String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER, STATUS, PARENT_PATH FROM DM_GROUP " String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER, STATUS, PARENT_PATH, PARENT_GROUP_ID FROM DM_GROUP "
+ "WHERE TENANT_ID = ?"; + "WHERE TENANT_ID = ?";
if (groupName != null && !groupName.isEmpty()) { if (groupName != null && !groupName.isEmpty()) {
sql += " AND GROUP_NAME LIKE ?"; sql += " AND GROUP_NAME LIKE ?";
@ -129,7 +129,7 @@ public class SQLServerGroupDAOImpl extends AbstractGroupDAOImpl {
try { try {
Connection conn = GroupManagementDAOFactory.getConnection(); Connection conn = GroupManagementDAOFactory.getConnection();
String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER, STATUS, PARENT_PATH FROM DM_GROUP " String sql = "SELECT ID, DESCRIPTION, GROUP_NAME, OWNER, STATUS, PARENT_PATH, PARENT_GROUP_ID FROM DM_GROUP "
+ "WHERE TENANT_ID = ?"; + "WHERE TENANT_ID = ?";
if (groupName != null && !groupName.isEmpty()) { if (groupName != null && !groupName.isEmpty()) {
sql += " AND GROUP_NAME LIKE ?"; sql += " AND GROUP_NAME LIKE ?";

Loading…
Cancel
Save