Comparing version 0.2.6 to 0.2.7
import Component from './Component'; | ||
import SequelizeAdapter from '../orm-adapters/SequelizeAdapter'; | ||
import { Model as SequelizeModel } from "sequelize"; | ||
import View from './View'; | ||
@@ -64,3 +63,3 @@ import Serializer from '../rest/Serializer'; | ||
*/ | ||
static ormModelClass: typeof SequelizeModel; | ||
static ormModelClass: () => any; | ||
/** | ||
@@ -67,0 +66,0 @@ * The [[Serializer]] that should be used for RESTful operations. |
@@ -160,3 +160,11 @@ "use strict"; | ||
*/ | ||
Application.ormModelClass = sequelize_1.Model; | ||
Application.ormModelClass = () => { | ||
try { | ||
return require("../../../orm-model-config").default; | ||
} | ||
catch (e) { | ||
console.log('omc-error', e); | ||
return sequelize_1.Model; | ||
} | ||
}; //SequelizeModel; | ||
/** | ||
@@ -163,0 +171,0 @@ * The [[Serializer]] that should be used for RESTful operations. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Pwoli_1 = require("../base/Pwoli"); | ||
const Application_1 = require("../base/Application"); | ||
@@ -11,5 +10,5 @@ const Component_1 = require("../base/Component"); | ||
extendableModelClass() { | ||
return Application_1.default.ormModelClass || Pwoli_1.default.config.ormModelClass; | ||
return (Application_1.default.ormModelClass)(); | ||
} | ||
} | ||
exports.default = ORMAdapter; |
@@ -69,2 +69,3 @@ "use strict"; | ||
const company = new pkgtest_models_1.Company(); | ||
console.log('company-test', company); | ||
if (req.method === 'POST') { | ||
@@ -71,0 +72,0 @@ let body = ''; |
{ | ||
"name": "pwoli", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/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
1388902
79
35717