Is it possible to retrieve (at least) the id of created model in $afterInsert hook in Objection ORM?
async $afterInsert(queryContext)
I guess and hope it could be available somehow from queryContext?
The goal is to be able to log this id when created in an allowed graph through insertGraph method.
You can access the returned data at this:
this
async $afterInsert(queryContext) { await super.$afterInsert(queryContext); console.log(this.id) }
1.4m articles
1.4m replys
5 comments
57.0k users