@kohanajs/mixin-orm
Advanced tools
Comparing version 3.0.16 to 3.0.17
const { ControllerMixin } = require('@kohanajs/core-mvc'); | ||
const { KohanaJS, ORM } = require('kohanajs'); | ||
const { ORM } = require('kohanajs'); | ||
@@ -44,3 +44,3 @@ const mapGetOrCreate = (map, key, defaultValue) => { | ||
if (Array.isArray(v)) { | ||
const Type = KohanaJS.require(ORM.classPrefix + prop); | ||
const Type = ORM.require(prop); | ||
if (!Model.belongsToMany.has(prop) && !Type.belongsToMany.has(type)) throw new Error(`Invalid input siblings ${prop} for ${Model.name}`); | ||
@@ -47,0 +47,0 @@ } else if (!Model.fields.has(prop) && !Model.belongsTo.has(prop)) { |
@@ -158,3 +158,3 @@ const { ControllerMixin } = require('@kohanajs/core-mvc'); | ||
const v = newValues.get(field); | ||
if (v === undefined || v == '') return; | ||
if (v === undefined || v === '') return; | ||
m[field] = v; | ||
@@ -179,3 +179,3 @@ changed = true; | ||
Model.belongsToMany.forEach(xx => { | ||
const k = `*${x}`; | ||
const k = `*${xx}`; | ||
if (m[k] === undefined) return; | ||
@@ -182,0 +182,0 @@ if (!Array.isArray(m[k])) throw new Error(`${k} must be Array`); |
{ | ||
"name": "@kohanajs/mixin-orm", | ||
"version": "3.0.16", | ||
"version": "3.0.17", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
19297