- Add missing queryMethods to Krypton.Knex
- Add pagination helper methods [.page(page, pageSize), .range(start, end)]
- Add
_getInstanceOrStaticKnex()
to Krypton.Model to get the correct knex instance
- Krypton.Relation will check models super tree for Krypton.Model
- Fixed a typo in Model.destroy()
- Add {after, before} destroy hooks
- Improve Invalid Hook Error Message
- Fix typos
- Add support for knex .pluck()
- Refactot hooks to ditch Promise.defer
- Refactor Error Handling
- HasOne Relation now returns null in there are no results
- Add .toSQL() support and optimize HasManyThrough relation
- Add Istanbul to package.json dev dependencies, This is so you can run
npm run test
without having to have had installed instanbul globally. - Variable name refactor in QueryBuilder
- Add missing .as Knex method
- Fix bug where false attributes were turning into null
- Fix a lodash deprecated method
- Fix race condition in HasManyThrough
- Fix eagerFetcher recursive iteration loop
- Fix record context in QueryBuilder eagerFetcher
- Add the ability to dynamically set a knex instance to Krypton.Model SubClases and to Krypton.Model instances
- Clean-up code
- Add ActiveRecord style callbacks (See README);
- Use an Model attributes Array instead of an Object