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

ee-orm

Package Overview
Dependencies
Maintainers
2
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ee-orm - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

27

lib/DefaultModel.js

@@ -37,3 +37,3 @@ !function(){

this._setProrperty('_relatingSets', options.relatingSets);
this._setProrperty('_fromDb', options.isFromDB || false);

@@ -113,3 +113,3 @@

, isFromDatabase: function(){
return this._fromDb;
return this._fromDb;
}

@@ -187,3 +187,3 @@

else callback(err);
}.bind(this));
}.bind(this));
}

@@ -262,3 +262,3 @@ else {

else callback(err);
}.bind(this));
}.bind(this));
}

@@ -271,3 +271,3 @@ else {

}
}.bind(this));
}.bind(this));
}

@@ -313,3 +313,3 @@ }.bind(this));

else {
connection.query('insert', query, function(err, result){
connection.query('insert', query, function(err, result){
if (err) callback(err);

@@ -319,8 +319,11 @@ else {

// reload
if (this._defintion.primaryKeys.length === 1){
this[this._defintion.primaryKeys[0]] = result.id;
if (!noReload) this.reload(callback, connection);
else callback(null, this);
if(result.id) {
if (this._defintion.primaryKeys.length === 1){
this[this._defintion.primaryKeys[0]] = result.id;
}
else throw new Error('Cannot load record with more than one primarykey!');
}
else throw new Error('Cannot load record with more than one primarykey!');
if (!noReload) this.reload(callback, connection);
else callback(null, this);
}

@@ -347,3 +350,3 @@ else throw new Error('not implemented!');

value.findOne(function(err, model) {
value.findOne(function(err, model) {
if (err) next(err);

@@ -350,0 +353,0 @@ else if (model) {

{
"name" : "ee-orm"
, "description" : "a simple yet powerful javascript orm for node.js"
, "version" : "0.1.6"
, "version" : "0.1.7"
, "homepage" : "https://github.com/eventEmitter/ee-orm"

@@ -6,0 +6,0 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)"

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