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

downstairs

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downstairs - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

8

lib/collection.js

@@ -332,3 +332,5 @@ var Collection = {}

var record = this;
model.find({id: this[foreignKeyName]}, function(err, one){
var query = {};
query[foreignKeyName] = record.id;
model.find(query, function(err, one){
record[hasOneAssociationName] = one;

@@ -351,3 +353,5 @@ cb(err, one);

var record = this;
model.findAll({id: this[foreignKeyName]}, function(err, all){
var query = {};
query[foreignKeyName] = record.id;
model.findAll(query, function(err, all){
record[hasManyAssociationName] = all;

@@ -354,0 +358,0 @@ cb(err, all);

@@ -37,6 +37,7 @@ var async = require('async')

var _model = this._model;
var self = this;
this.isValid(function(err, result){
if (result){
return _model.update(data, {id: this.id}, cb);
return self._model.update(data, {id: self.id}, cb);
}

@@ -43,0 +44,0 @@ else {

{
"name": "downstairs",
"description": "A light ORM wrapped about brianc's node-sql and node-pg",
"version": "0.3.1",
"version": "0.3.2",
"homepage": "https://github.com/moneytribeaustralia/downstairs.js",

@@ -6,0 +6,0 @@ "author": {

@@ -14,3 +14,2 @@ var Downstairs = require('../lib/downstairs')

describe('belongsTo', function(done){
beforeEach(function(done){

@@ -17,0 +16,0 @@ helper.resetDb(helper.userSQL + helper.roleSQL, done);

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