Repository navigation
v4.0.0
Upgrading from 3.x? Start with the migration guide. All changes are in the changelog.
Highlights
- objection is an ES module package, requires Node 20.19 or newer, knex 3.3, MySQL 8 and TypeScript 5.8
upsertGraph()andinsertGraph()are rewritten:- they write graphs in dependency order, and move rows between owners and slots without failing
- they reject conflicting graphs before writing anything
#refand#ref{}work across the whole graph, also below related models
- Static hooks get the result in the shape that the query returns, and
withGraphFetched()assigns whatafterFindreturns limit(),offset()andfirst()in graph modifiers apply per parent by defaultBelongsToManyRelation, for owners that hold an array of keys- JSON field expressions work on MySQL and SQLite
- The typings check columns against the models in strict mode, and narrow results after
select()
3.x keeps getting fixes on the 3.x branch, published under the legacy dist-tag.