Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spinajs/orm

Package Overview
Dependencies
Maintainers
1
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/orm - npm Package Compare versions

Comparing version 1.2.175 to 1.2.176

25

lib/relations.js

@@ -594,6 +594,11 @@ "use strict";

const driver = this.Orm.Connections.get(this.TargetModelDescriptor.Connection);
await driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).andWhere(function () {
const query = driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).andWhere(function () {
this.whereNotIn(self.Relation.PrimaryKey, result.filter((x) => x.PrimaryKeyValue).map((x) => x.PrimaryKeyValue));
this.where(self.Relation.ForeignKey, self.owner.PrimaryKeyValue);
});
query.setTable(this.TargetModelDescriptor.TableName);
if (driver.Options.Database) {
query.database(driver.Options.Database);
}
await query;
this.empty();

@@ -605,6 +610,11 @@ await this.add(result);

const driver = this.Orm.Connections.get(this.TargetModelDescriptor.Connection);
await driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).andWhere(function () {
const query = driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).andWhere(function () {
this.whereNotIn(self.Relation.PrimaryKey, obj.filter((x) => x.PrimaryKeyValue).map((x) => x.PrimaryKeyValue));
this.where(self.Relation.ForeignKey, self.owner.PrimaryKeyValue);
});
query.setTable(this.TargetModelDescriptor.TableName);
if (driver.Options.Database) {
query.database(driver.Options.Database);
}
await query;
this.empty();

@@ -617,6 +627,11 @@ await this.add(obj);

const driver = this.Orm.Connections.get(this.TargetModelDescriptor.Connection);
await driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).andWhere(function () {
const query = driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).andWhere(function () {
this.whereNotIn(self.Relation.PrimaryKey, result.filter((x) => x.PrimaryKeyValue).map((x) => x.PrimaryKeyValue));
this.where(self.Relation.ForeignKey, self.owner.PrimaryKeyValue);
});
query.setTable(this.TargetModelDescriptor.TableName);
if (driver.Options.Database) {
query.database(driver.Options.Database);
}
await query;
this.empty();

@@ -635,2 +650,6 @@ await this.add(result);

const query = driver.Container.resolve(builders_1.DeleteQueryBuilder, [driver, this.Relation.TargetModel]).whereIn(this.Relation.ForeignKey, data);
query.setTable(this.TargetModelDescriptor.TableName);
if (driver.Options.Database) {
query.database(driver.Options.Database);
}
await query;

@@ -637,0 +656,0 @@ _.remove(this, (o) => data.indexOf(o.PrimaryKeyValue) !== -1);

4

package.json
{
"name": "@spinajs/orm",
"version": "1.2.175",
"version": "1.2.176",
"description": "framework orm module",

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

},
"gitHead": "700586c05e1d365a83180285ab5911bb88c18890"
"gitHead": "17625a82f9e3b0a5a689b6fc8652911d19e822f2"
}

Sorry, the diff of this file is not supported yet

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