Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-4580

The attribute "totalCount" for OnmsNodeList is not well calculated

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.10, 1.9.6
    • Fix Version/s: 1.8.11, 1.9.7
    • Component/s: REST
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      That means that the "pagination" feature used with data from NodeRestService will be wrong.

      The problem is related to the criteria used to query node's table.

      OnmsCriteria rootCriteria = new OnmsCriteria(OnmsNode.class);
      rootCriteria.add(Subqueries.propertyIn("id", criteria.getDetachedCriteria()));
      coll.setTotalCount(m_nodeDao.countMatching(rootCriteria));

      That doesn't match with the "main" criteria used to create the node list object.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              agalue Alejandro Galue
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: