Uploaded image for project: 'Spring Data MongoDB'
  1. Spring Data MongoDB
  2. DATAMONGO-2001

Count within session should return only the total count of documents visible to the specific session

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.1 M3 (Lovelace)
    • Fix Version/s: 2.1 RC1 (Lovelace)
    • Component/s: Core
    • Labels:
      None

      Description

      count includes data from other sessions which means that the numbers can be false when working with ClientSession, maybe inside transactions.

      This leads to a number of problems anlong the repositroy layer which uses count for its pagination support as well as exists operations.

      Whithin an active session MongoTemplate should redirect the intended count command to an aggregation $count preceded by a $match operator holding the mapped count query.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cstrobl Christoph Strobl
                Reporter:
                cstrobl Christoph Strobl
                Last updater:
                Mark Paluch
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: