Is Iterate over findAll result and update records possible? #17251
Labels
pending-approval
Bug reports that have not been verified yet, or feature requests that have not been accepted yet
type: feature
For issues and PRs. For new features. Never breaking changes.
Issue Creation Checklist
Feature Description
Describe the feature you'd like to see implemented
When I use
findAll
function to find the records, I should be able to iterate over them and update them. For e.g.I don't want to use udpate:where because I have a logic in the if block which is dependent on other factors.
Right now, it doesn't save the individual user object, instead it fires a query on
user.save
Describe why you would like this feature to be added to Sequelize
We should be able to treat the result of finders as the set of model objects and perform further operations as per the need. Not sure if this is already available in sequelize and I am missing something. Please let me know if you need more details.
Is this feature dialect-specific?
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the addition of this feature by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: