Skip to content

Replace usage of deprecated collection.count() with collection.countDocuments() [DATAMONGO-2059] #2925

Closed
@spring-projects-issues

Description

@spring-projects-issues

Christoph Strobl opened DATAMONGO-2059 and commented

sessionBound.query(Person.class)
    .matching(query(where("location")
        .near(new Point(1, 0)))

fails with

error 2 (BadValue): $match does not support $geoNear, $near, and $nearSphere

we need to switch over to $geoWithin using $center


Reference URL: https://jira.mongodb.org/browse/DRIVERS-518

Issue Links:

  • DATAMONGO-2192 Improve count() and countDocuments() mapping documentation and/or method availability

Referenced from: pull request #604

Metadata

Metadata

Labels

in: coreIssues in core supporttype: taskA general task

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions