Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-815

applySkipLimit on getCount

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.11.0
    • API
    • Minor Change

    Description

      The limit is ignored when calling this method on DBCollection:
      getCount(DBObject query, DBObject fields, long limit, long skip, ReadPreference readPrefs). This will fix the issue, but not sure if this is intended behaviour or not:

      < if ( limit > 0 )
      < cmd.put( "limit" , limit );
      < }

      > if ( limit > 0 )

      { > cmd.put( "limit" , limit ); > cmd.put( "applySkipLimit", true ); > }

      Attachments

        Activity

          People

            Unassigned Unassigned
            rasmus Rasmus Sundberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: