Skip to content

fix(database): updateMany ignores _q and filters - #27769

Draft
nclsndr wants to merge 1 commit into
developfrom
fix/updateMany-q-filters
Draft

nclsndr wants to merge 1 commit into
developfrom
fix/updateMany-q-filters

Conversation

@nclsndr

@nclsndr nclsndr commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

What does it do?

updateMany now initializes the query builder with the same filter keys as deleteMany and count: _q, where, and filters. Pagination, populate, and select stay ignored so the write set does not diverge from count.

Why is it needed?

updateMany({ _q: 'Hugo', data }) updated every row (count=3 instead of 1). Entity-manager updateMany only forwarded where + data. Query-builder init({ _q, where }).update() already works after #26909. This is not a #26909 regression.

How to test it?

yarn test:unit update-many.test.ts relation-subquery.test.ts --forceExit
# in packages/core/database

yarn test:api -- --generate-app=false tests/api/core/database/db.test.api.js
# "updateMany relation filters" and "deleteMany filter params"

Related issue(s)/PR(s)


AI assisted

@nclsndr nclsndr added source: core:database Source is core/database package pr: fix This PR is fixing a bug labels Sep 22, 2026
@trunk-io

trunk-io Bot commented Sep 22, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Create collection type with all field types › Can create a collection type with all field types The test failed because the page could not connect to the server, causing reload and click actions to timeout. Logs ↗︎

View Full Report ↗︎Docs

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix This PR is fixing a bug source: core:database Source is core/database package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

updateMany ignores _q and filters

1 participant