mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Avoiding multiple device data getting retrieved upon the same id
This commit is contained in:
parent
e27905792f
commit
c63818b78f
@ -748,7 +748,7 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
String sql = "SELECT ID AS ENROLMENT_ID FROM DM_ENROLMENT WHERE DEVICE_ID = (SELECT d.ID " +
|
||||
String sql = "SELECT ID AS ENROLMENT_ID FROM DM_ENROLMENT WHERE DEVICE_ID = (SELECT DISTINCT d.ID " +
|
||||
"FROM DM_DEVICE d, DM_DEVICE_TYPE t WHERE d.DEVICE_TYPE_ID = t.ID " +
|
||||
"AND d.DEVICE_IDENTIFICATION = ? AND t.NAME = ? AND d.TENANT_ID = ?) " +
|
||||
"AND STATUS = ? AND TENANT_ID = ?";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user