You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@spinajs/orm

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/orm - npm Package Compare versions

Comparing version

to
1.2.189

@@ -11,3 +11,3 @@ "use strict";

dehydrate(model, includeRelations, omit) {
var _a, _b;
var _a;
const obj = {};

@@ -28,5 +28,10 @@ (_a = model.ModelDescriptor.Columns) === null || _a === void 0 ? void 0 : _a.forEach((c) => {

if (model[val.Name]) {
obj[val.ForeignKey] = (_b = obj[val.ForeignKey]) !== null && _b !== void 0 ? _b : model[val.Name].PrimaryKeyValue;
obj[val.Name] = model[val.Name].UnderlyingValue ? model[val.Name].dehydrate() : undefined;
}
}
if (val.Type === interfaces_1.RelationType.Many) {
if (model[val.Name]) {
obj[val.Name] = model[val.Name].map((x) => x.dehydrate());
}
}
}

@@ -33,0 +38,0 @@ }

{
"name": "@spinajs/orm",
"version": "1.2.180",
"version": "1.2.189",
"description": "framework orm module",

@@ -55,3 +55,3 @@ "main": "lib/index.js",

},
"gitHead": "e458bf24652e46764c934ba88463fab0ce803a4d"
"gitHead": "fc4bff63cdfc3ff9fb2009188fea31557ae790bf"
}

Sorry, the diff of this file is not supported yet