objection
Advanced tools
Comparing version 3.0.0-rc.1 to 3.0.0-rc.2
@@ -11,6 +11,9 @@ 'use strict'; | ||
this.model = null; | ||
this.args = null; | ||
} | ||
onAdd(builder, args) { | ||
if (!isEmpty(args) && isObject(args[0])) { | ||
this.args = args; | ||
if (!isEmpty(args) && isObject(args[0]) && !Array.isArray(args[0])) { | ||
const json = args[0]; | ||
@@ -37,3 +40,3 @@ const modelClass = builder.modelClass(); | ||
return knexBuilder.merge(); | ||
return knexBuilder.merge(...this.args); | ||
} | ||
@@ -48,2 +51,3 @@ | ||
clone.model = this.model; | ||
clone.args = this.args; | ||
return clone; | ||
@@ -50,0 +54,0 @@ } |
{ | ||
"name": "objection", | ||
"version": "3.0.0-rc.1", | ||
"version": "3.0.0-rc.2", | ||
"description": "An SQL-friendly ORM for Node.js", | ||
@@ -8,5 +8,5 @@ "main": "lib/objection.js", | ||
"scripts": { | ||
"test": "npm run eslint && mocha --slow 10 --timeout 15000 --reporter spec --recursive tests --exclude \"tests/unit/relations/files/**\"", | ||
"test-fast": "mocha --slow 10 --timeout 15000 --reporter spec --recursive tests --bail --exclude \"tests/unit/relations/files/**\"", | ||
"test-typings": "tsc", | ||
"test": "npm run eslint && mocha --slow 10 --timeout 15000 --reporter spec --recursive tests --exclude \"tests/unit/relations/files/**\" && npm run test:typings", | ||
"test:fast": "mocha --slow 10 --timeout 15000 --reporter spec --recursive tests --bail --exclude \"tests/unit/relations/files/**\"", | ||
"test:typings": "tsc", | ||
"prettier": "prettier --write \"{examples,lib,tests,typings,doc}/**/*.{js,ts}\"", | ||
@@ -13,0 +13,0 @@ "eslint": "eslint --format codeframe \"examples/**/*.js\" \"lib/**/*.js\" \"tests/**/*.js\"", |
@@ -963,3 +963,3 @@ /// <reference types="node" /> | ||
ignore(): this; | ||
merge(merge?: PartialModelObject<M>): this; | ||
merge(merge?: PartialModelObject<M> | string[]): this; | ||
@@ -966,0 +966,0 @@ insertAndFetch(insert: PartialModelObject<M>): SingleQueryBuilder<this>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
631470
19689