mythix-orm
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -1270,3 +1270,3 @@ 'use strict'; | ||
if (options.force !== true && Nife.isEmpty(this.changes)) { | ||
if (this.isPersisted() && options.force !== true && Nife.isEmpty(this.changes)) { | ||
return false; | ||
@@ -1273,0 +1273,0 @@ } else if (options.force) { |
@@ -98,2 +98,4 @@ 'use strict'; | ||
AUTO_INCREMENT._mythixIsAutoIncrement = true; | ||
const DATETIME_NOW = generatePermutations(function(context) { | ||
@@ -100,0 +102,0 @@ return context.connection.getDefaultFieldValue('DATETIME_NOW', context); |
@@ -119,2 +119,6 @@ 'use strict'; | ||
}, | ||
'pluck': async function({ field, type }, fields, options, ...args) { | ||
let query = await type.prepareQuery({ connection: null, self: this, field, options }, args); | ||
return await query.pluck(fields, options); | ||
}, | ||
}; | ||
@@ -121,0 +125,0 @@ |
@@ -109,3 +109,5 @@ 'use strict'; | ||
// if a constraint fails because the records | ||
// already exist | ||
// already exist. The opposite might also be true, | ||
// where the target models already exist, and | ||
// so shouldn't be created. | ||
return this.getConnection(options && options.connection).transaction(async (connection) => { | ||
@@ -231,2 +233,6 @@ let currentModels = this[field.fieldName]; | ||
}, | ||
'pluck': async function({ field, type }, userQuery, fields, options, ...args) { | ||
let query = await type.prepareQuery({ connection: null, self: this, field, fields, userQuery, options }, args); | ||
return await query.pluck(fields, options); | ||
}, | ||
'has': async function({ count }, userQuery, options, ...args) { | ||
@@ -233,0 +239,0 @@ let itemCount = await count.call(this, userQuery, options, ...args); |
{ | ||
"name": "mythix-orm", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "ORM for Mythix framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
262533
76
6692