New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mythix-orm

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mythix-orm - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

16

lib/connection/connection-base.js

@@ -903,3 +903,3 @@ 'use strict';

let batchModel = batchModels[i];
batchModel.clearDirty();
// batchModel.clearDirty();
finalResults.push(batchModel);

@@ -926,2 +926,3 @@ }

let allDirtyModels = new Set();
let allStoredModels = new Set();
let primaryResult;

@@ -946,2 +947,4 @@

for (let storedModel of results) {
allStoredModels.add(storedModel);
for (let [ groupModelName, groupModels ] of groupedModelMap) {

@@ -959,5 +962,4 @@ if (groupModelName === modelName)

for (let targetModel of groupModels) {
Utils.setRelationalValues(this, TargetModel, targetModel, GroupModel, storedModel);
if (targetModel.isDirty())
let hasChanges = Utils.setRelationalValues(this, TargetModel, targetModel, GroupModel, storedModel);
if (hasChanges)
allDirtyModels.add(targetModel);

@@ -975,2 +977,8 @@ }

// Now mark all models as clean and persisted
for (let storedModel of allStoredModels) {
storedModel.clearDirty();
storedModel._persisted = true;
}
return (inputIsArray || !primaryResult) ? primaryResult : primaryResult[0];

@@ -977,0 +985,0 @@ }

@@ -21,3 +21,3 @@ import ConnectionBase from '../connection/connection-base';

export declare interface ModelsRelationStatuses {
[ key: string ]: RelationStatus
[key: string]: RelationStatus
}

@@ -74,3 +74,3 @@

sourceModelInstance: Model,
): T;
): boolean;

@@ -86,3 +86,3 @@ export declare function assignRelatedModels(model: Model, relatedModels: Model | Array<Model>): void;

},
): Array<any> | { [ key: string ]: Array<any> };
): Array<any> | { [key: string]: Array<any> };

@@ -89,0 +89,0 @@ export declare function buildQueryFromModelsAttributes(

@@ -534,5 +534,6 @@ 'use strict';

if (targetModelName === sourceModelName)
return targetModelInstance;
return false;
let fieldSets = TargetModel.getForeignKeysTargetFieldNames(connection, sourceModelName);
let fieldSets = TargetModel.getForeignKeysTargetFieldNames(connection, sourceModelName);
let hasChanges = false;

@@ -552,6 +553,9 @@ // Update fields to related model

targetModelInstance[targetFieldName] = sourceModelValue;
if (targetModelInstance[targetFieldName] !== sourceModelValue) {
targetModelInstance[targetFieldName] = sourceModelValue;
hasChanges = true;
}
}
return targetModelInstance;
return hasChanges;
}

@@ -558,0 +562,0 @@

{
"name": "mythix-orm",
"version": "1.7.0",
"version": "1.7.1",
"description": "ORM for Mythix framework",

@@ -5,0 +5,0 @@ "main": "lib/index",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc