Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update operation in MongoDB impact all matched documents #7803

Merged
merged 1 commit into from Jun 26, 2021

Conversation

SnapeEye
Copy link
Contributor

@SnapeEye SnapeEye commented Jun 25, 2021

Update operation should update all matched documents, but now it updates the first found document

Closes: #7788

Description of change

In current solution, when you perform update operation for MongoDB, only the first found document, that is matching the search condition, is updated. This PR is fixing this problem, making update to all documents which are supposed to be modified making update operation.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

Update operation should update all matched documents, but now it updates the first found document

Closes: typeorm#7788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MongoDB update make changes only to first matched document
2 participants