Avoiding multiple device data getting retrieved upon the same id

revert-70aa11f8
prabathabey 8 years ago
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…
Cancel
Save