-
Notifications
You must be signed in to change notification settings - Fork 643
Closed
Description
I've noticed that in the v0.6.0 next code doesn't work anymore when I try to insert new record:
static get jsonSchema() {
return {
type: 'object',
required: ['text', 'session_id', 'created_at'],
// properties: ...
}
}
I've got next exception:
TypeError: Cannot convert undefined or null to object
at mergeWithDefaults (/vagrant/node_modules/objection/lib/model/ModelBase.js:643:38)
at UserLogin.$setJson (/vagrant/node_modules/objection/lib/model/ModelBase.js:255:14)
at UserLogin.$setJson (/vagrant/node_modules/objection/lib/model/Model.js:331:35)
at Function.fromJson (/vagrant/node_modules/objection/lib/model/ModelBase.js:521:11)
at Function.ensureModel (/vagrant/node_modules/objection/lib/model/Model.js:607:25)
at Function.ensureModelArray (/vagrant/node_modules/objection/lib/model/Model.js:632:20)
at InsertOperation.call (/vagrant/node_modules/objection/lib/queryBuilder/operations/InsertOperation.js:55:40)
at QueryBuilder.callQueryBuilderOperation (/vagrant/node_modules/objection/lib/queryBuilder/QueryBuilderBase.js:349:19)
at QueryBuilder.insert (/vagrant/node_modules/objection/lib/queryBuilder/QueryBuilder.js:1098:17)
If I add properties description it will work correctly.