Adding pagination hooks and bug fixes
Pagination hooks
We have added ORM hooks for pagination too.
beforePaginate
class User extends BaseModel {
@beforePaginate()
public static someMethod ([countQuery, query]) {
}
}afterPaginate
class User extends BaseModel {
@afterPaginate()
public static someMethod (paginator) {
console.log(paginator.all())
console.log(paginator.total)
}
}Commits
- chore: update dependencies f7bd18f
- feat: add pagination hooks 1f9b1d3
- fix: re-compute dirty properties after initiating auto update columns b309acb
- chore: update dependencies ef3cf10
- fix(serialization): pick all fields when pick property is undefined fa0a214
- improvement:
updateOrCreateandupdateOrCreateManycan handle concurrent updates too 5bee648 - chore: update dependencies 4754a8c
- chore: update dependencies ed90d3a