Changelog - 2026-11-08
One name per bulk operation - updateAll, deleteAll and restoreAll are removed
BreakingIn one line. A bulk write is updateBy, deleteBy or restoreBy. The All twins are gone, with no alias, and where is required in the type.
What was removed
updateAllanddeleteAllonAbstractRepository, onIUpdatableRepositoryandIDeletableRepository, and on the relational, search and HTTP repositories (DefaultCRUDRepository,SoftDeletableRepository,DefaultSearchRepository,HttpRepositoryand their read-only bases).restoreAllonSoftDeletableRepository(and the SQLite one).- The old
updateByanddeleteBy, which only forwarded to those methods. Their bodies are now the methods:updateBy,deleteByandrestoreBydo the work.
What changed
whereis required onupdateBy,deleteByandrestoreBy. Before,deleteAllandrestoreAlltook an optional one.- The whole table is
where: {}withoptions.force: true. The empty-where check is the same one as before: withoutforcean empty effective condition is refused. On a search repositorywhere: {}plusforcetruncates the collection, asdeleteAll({ options: { force: true } })did. - The 400 of an update that carries
deletedAtnames the new methods: "deletedAt changes only through deleteById/deleteBy and restoreById/restoreBy". - Not renamed:
updateById,deleteById,restoreById,updateEach,createAll, and the search connector's owndocument.deleteAll({ collection }).
Before and after
typescript
// Before
await repo.updateAll({ where: { status: 'OPEN' }, data: { status: 'DONE' } });
await repo.deleteAll({ options: { force: true } });
await repo.restoreAll({ where: { id: { gt: 10 } } });
// After
await repo.updateBy({ where: { status: 'OPEN' }, data: { status: 'DONE' } });
await repo.deleteBy({ where: {}, options: { force: true } });
await repo.restoreBy({ where: { id: { gt: 10 } } });Who is affected
- Every call to
updateAll,deleteAllorrestoreAll. Rename it, and givewhereto adeleteAll()orrestoreAll()that had none:where: {}withoptions: { force: true }for the whole table. - A repository class that overrides or implements them (a custom
IUpdatableRepository, a subclass ofAbstractRepository): implementupdateByanddeleteByinstead. A subclass that only overrode theByalias now overrides the real method. - A subclass that overrode
updateAllordeleteAllwithout theoverridekeyword now compiles, and its override never runs: nothing calls those names any more. The secondrgfinds them. - Code that wraps or mocks the repository in tests.
- Everyone else. No action needed.
Find the call sites:
bash
rg -n '\.(updateAll|deleteAll|restoreAll)\s*(<|\()' --glob '*.{ts,tsx,js,mjs,cjs}' --glob '!node_modules'
rg -n '\b(updateAll|restoreAll|deleteAll)\b' --glob '*.{ts,tsx,js,mjs,cjs}' --glob '!node_modules' # overrides and mocks; document.deleteAll is the search connector and staysThe typecheck finds the rest: "Property 'updateAll' does not exist", or "Property 'where' is missing".
Details
| File | Package |
|---|---|
src/base/repositories/core/abstract.ts, src/base/repositories/common/types/contracts.ts | kernel |
src/relational/core/repositories/core/{base,persistable,readable,soft-deletable}.ts | connectors |
src/search/core/repositories/core/{persistable,readable}.ts, src/http/repository.ts | connectors |
src/components/static-asset/controller/{factory,meta-link}.ts | core-server |