mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix application count query not containing AP_APP_RELEASE columns when filtering
Fix inaccurate application count when an appliction has more than 1 release
This commit is contained in:
parent
097423b2b0
commit
986828bc16
@ -260,8 +260,11 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
|
||||
Connection conn;
|
||||
PreparedStatement stmt = null;
|
||||
ResultSet rs = null;
|
||||
String sql = "SELECT count(AP_APP.ID) AS APP_COUNT "
|
||||
String sql = "SELECT count(DISTINCT AP_APP.ID) AS APP_COUNT "
|
||||
+ "FROM AP_APP "
|
||||
+ "LEFT JOIN AP_APP_RELEASE ON "
|
||||
+ "AP_APP.ID = AP_APP_RELEASE.AP_APP_ID "
|
||||
+ "INNER JOIN (SELECT ID FROM AP_APP) AS app_data ON app_data.ID = AP_APP.ID "
|
||||
+ "WHERE AP_APP.TENANT_ID = ?";
|
||||
|
||||
if (filter == null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user