Skip to content

Commit

Permalink
Merge branch 'release/4.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 30, 2017
2 parents d119d4b + ad0afe4 commit 2322b8f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 140 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<a name="4.0.4"></a>
## [4.0.4](https://github.com/adonisjs/adonis-lucid/compare/v4.0.3...v4.0.4) (2017-07-30)


### Bug Fixes

* **model:** set makePlain getter for ioc container ([40b3e85](https://github.com/adonisjs/adonis-lucid/commit/40b3e85))


### Features

* **migration:** remove migration:make command ([0a97527](https://github.com/adonisjs/adonis-lucid/commit/0a97527))



<a name="4.0.3"></a>
## [4.0.3](https://github.com/adonisjs/adonis-lucid/compare/v4.0.2...v4.0.3) (2017-07-17)

Expand Down
104 changes: 0 additions & 104 deletions commands/MigrationMake.js

This file was deleted.

33 changes: 0 additions & 33 deletions commands/templates/make.mustache

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adonisjs/lucid",
"version": "4.0.3",
"version": "4.0.4",
"description": "SQL ORM built on top of Active Record pattern",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const proxyHandler = {
*/
class Database {
constructor (config) {
if (config.client === 'sqlite') {
if (config.client === 'sqlite' || config.client === 'sqlite3') {
config.useNullAsDefault = _.defaultTo(config.useNullAsDefault, true)
}
this.knex = knex(config)
Expand Down
2 changes: 1 addition & 1 deletion src/Lucid/Hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Hooks {
*/
addHandler (event, handler, name) {
if (!this._events[event]) {
// error
throw CE.InvalidArgumentException.invalidParameter(`${event} is not a valid hook event`)
}
this._handlers[event] = this._handlers[event] || []
this._handlers[event].push({ handler, name })
Expand Down
13 changes: 13 additions & 0 deletions src/Lucid/Model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@ class Model extends BaseModel {
return ['_bootIfNotBooted']
}

/**
* Making sure that `ioc.make` returns
* the class object and not it's
* instance
*
* @method makePlain
*
* @return {Boolean}
*/
static get makePlain () {
return true
}

/**
* The primary key for the model. You can change it
* to anything you want, just make sure that the
Expand Down

0 comments on commit 2322b8f

Please sign in to comment.