Enrolled devices should be shown with latest first (#544)

Co-authored-by: sathira <Sathira@entgra.io>
Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/544
Co-authored-by: Sathira Perera <sathira@entgra.io>
Co-committed-by: Sathira Perera <sathira@entgra.io>
This commit is contained in:
Sathira Perera 2024-12-02 15:35:36 +00:00 committed by Navod Zoysa
parent 9e34ec99aa
commit 7eb53adca9

View File

@ -180,8 +180,7 @@ public class GenericDeviceDAOImpl extends AbstractDeviceDAOImpl {
} else {
sql += " GROUP BY e.ID ";
}
sql += ") ";
sql += " LIMIT ? OFFSET ?";
sql += ") ORDER BY d1.LAST_UPDATED_TIMESTAMP DESC LIMIT ? OFFSET ?";
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
int paramIdx = 1;