Repository navigation
fix(deps): update dependency objection to v4 - #893
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/objection-4.x
branch
14 times, most recently
from
October 25, 2026 05:41
4a65f8c to
23e454c
Compare
renovate
Bot
force-pushed
the
renovate/objection-4.x
branch
9 times, most recently
from
October 30, 2026 08:36
03e8485 to
ad96c05
Compare
renovate
Bot
force-pushed
the
renovate/objection-4.x
branch
from
November 2, 2026 04:48
ad96c05 to
8c998f6
Compare
renovate
Bot
force-pushed
the
renovate/objection-4.x
branch
from
November 5, 2026 23:47
8c998f6 to
c02c879
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.9.1→4.4.3Release Notes
ditojs/objection (objection)
v4.4.3Compare Source
Fixes
withGraphJoined()andwithGraphFetched()and select all columns of the root table, e.g. withselect('*')orselect('Person.*'), load the fetched relations again. Since 3.8.0,withGraphJoined()replaces the*with the table's columns, which made the query skip the build step ofwithGraphFetched(), so its relations were missing from the result without an error #2269onBuild()hook that removes operations, e.g. withclearSelect(), no longer makes the query skip building the operation after them, e.g. thewhereoffindById(), which made the query read, update or delete all rowsv4.4.2Compare Source
Fixes
upsertGraph()doesn't update models whose given props are unchanged apart from props that aren't written to the database, like props that$formatDatabaseJson()orpickJsonSchemaPropertiesleave out. They counted as changed, and the update ran the$beforeUpdate()hooks, which could still write e.g. timestamps #546v4.4.1Compare Source
Changes
insertGraph()andupsertGraph()resolve the settings of each relation path once instead of for every model and option, which speeds up large graphs with manyrelationsentriesv4.4.0Compare Source
Changes
Model.getGraphSettings(), which resolves the strict mode settings ofinsertGraph()orupsertGraph()for a relation path from the options of a call, with the same rules and defaults as the call itself #537Fixes
insertGraph()withadded: 'relate'throws aNotFoundErrorfor related models whose ids don't exist, before anything is written, likeupsertGraph()does. Since 4.3.0, it related them unchecked, writing keys that point to no row unless a foreign key constraint rejected them #538v4.3.0Compare Source
Changes
strictoption toinsertGraph()andupsertGraph()that makes graphs say what they mean. Options are given per relation, asrootandrelationssettings for the rows that a graph leaves out (removed), the rows with ids that aren't in their relation yet (added), the rows that stay (kept) and the new rows (created). In strict mode, they replace the per-path options likerelate,unrelateandnoDelete. See strict mode #429insertGraph()andupsertGraph()are atomic: they run in a transaction, their own unless the query already runs in one, so a database error halfway leaves nothing written. Hooks that run queries need to usecontext.transaction, or they wait for the transaction, and deadlock on SQLite #477Fixes
upsertGraph()options declarefetchStrategy, which TypeScript rejected since 1.6.4 added the option #531v4.2.0Compare Source
All changes are in the changelog.
Changes
patchAndFetch()orupdateAndFetch()query a second time, e.g. awaiting it twice, throws. The second run wrote back the row that the first one fetched, undoing other writes in between.Fixes
patchAndFetch()andupdateAndFetch()with an empty patch return the unchanged model instead ofundefinedasFindQuery()in static after hooks runs theonBuildhooks of the query's context only oncev4.1.0Compare Source
All changes are in the changelog.
Changes
->/->>instead of#>/#>>, so expression indexes like((props->>'points'))match them. An index built on the#>>'{key}'form needs to be rebuilt with->>.Fixes
ref().castText()on JSON paths works withmysql2on MySQL, e.g. in JSON relation joinsstandard_conforming_stringsoffwhere({ }),findOne({ })andhaving({ })v4.0.0Compare Source
Upgrading from 3.x? Start with the migration guide. All changes are in the changelog.
Highlights
upsertGraph()andinsertGraph()are rewritten:#refand#ref{}work across the whole graph, also below related modelswithGraphFetched()assigns whatafterFindreturnslimit(),offset()andfirst()in graph modifiers apply per parent by defaultBelongsToManyRelation, for owners that hold an array of keysselect()3.x keeps getting fixes on the
3.xbranch, published under thelegacydist-tag.v3.9.3Compare Source
Fixes
withGraphJoined()andwithGraphFetched()and select all columns of the root table, e.g. withselect('*')orselect('Person.*'), load the fetched relations again. Since 3.8.0,withGraphJoined()replaces the*with the table's columns, which made the query skip the build step ofwithGraphFetched(), so its relations were missing from the result without an error #2269onBuild()hook that removes operations, e.g. withclearSelect(), no longer makes the query skip building the operation after them, e.g. thewhereoffindById(), which made the query read, update or delete all rowsv3.9.2Compare Source
Fixes
upsertGraph()doesn't update models whose given props are unchanged apart from props that aren't written to the database, like props that$formatDatabaseJson()orpickJsonSchemaPropertiesleave out. They counted as changed, and the update ran the$beforeUpdate()hooks, which could still write e.g. timestamps #547Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.