Closed
Description
RAJESH GUPTA opened DATAMONGO-1704 and commented
Hi Team,
I am using Spring Mongo operations and I want to use updateFirst() command. In this method we have to pass the query with criteria. The query has some criterias with Sort Order also but during the updateFirst() it doesn't include the order
Issue Links:
- DATAMONGO-1731 Improve JavaDoc of MongoOperations update / findAndModify methods
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
spring-projects-issues commentedon Jul 4, 2017
Christoph Strobl commented
Thank you RAJESH GUPTA.
updateFirst
triggers db.collection.updateOne which does not havesort
.However you might want to try
findAndModify
which will takesort
into account by using db.collection.findOneAndUpdate operation.I've opened DATAMONGO-1731 to tweak documentation
spring-projects-issues commentedon Jan 6, 2021
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
spring-projects-issues commentedon Jan 13, 2021
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.