waterline
Advanced tools
Comparing version 0.13.1-0 to 0.13.1-1
@@ -235,6 +235,4 @@ /** | ||
// Add a "sort" clause to the criteria, using the junction table's primary key. | ||
var comparatorDirective = {}; | ||
comparatorDirective[junctionTablePrimaryKeyColumnName] = 'ASC'; | ||
junctionTableQuery.criteria.sort = [ comparatorDirective ]; | ||
// Add an empty "sort" clause to the criteria. | ||
junctionTableQuery.criteria.sort = []; | ||
@@ -327,9 +325,6 @@ // Grab all of the primary keys found in the parent query, build them into an | ||
baseChildTableQuery.criteria.sort = secondJoin.criteria.sort; | ||
} else { | ||
baseChildTableQuery.criteria.sort = (function() { | ||
var comparatorDirective = {}; | ||
comparatorDirective[childTableModel.primaryKey] = 'ASC'; | ||
return [ comparatorDirective ]; | ||
})(); | ||
} | ||
else { | ||
baseChildTableQuery.criteria.sort = []; | ||
} | ||
@@ -481,9 +476,6 @@ // If the user's subcriteria contained a `select`, add it to our criteria. | ||
baseChildTableQuery.criteria.sort = singleJoin.criteria.sort; | ||
} else { | ||
baseChildTableQuery.criteria.sort = (function() { | ||
var comparatorDirective = {}; | ||
comparatorDirective[childTableModel.primaryKey] = 'ASC'; | ||
return [ comparatorDirective ]; | ||
})(); | ||
} | ||
else { | ||
baseChildTableQuery.criteria.sort = []; | ||
} | ||
@@ -490,0 +482,0 @@ // If the user's subcriteria contained a `select`, add it to our criteria. |
@@ -131,9 +131,6 @@ /** | ||
// ═╩╝╚═╝╚ ╩ ╩╚═╝╩═╝╩ | ||
// If no `sort` clause was provided, give it a default value so that | ||
// this criteria indicates that matching records should be examined | ||
// in ascending order of their primary key values. | ||
// e.g. `[ { id: 'ASC' } ]` | ||
// If no `sort` clause was provided, give it a default (empty) value, | ||
// indicating the adapter should use its default sorting strategy | ||
if (_.isUndefined(sortClause)) { | ||
sortClause = [ {} ]; | ||
sortClause[0][WLModel.primaryKey] = 'ASC'; | ||
sortClause = []; | ||
}//>- | ||
@@ -140,0 +137,0 @@ |
@@ -603,5 +603,4 @@ /** | ||
if (indexesToRemove.length > 0) { | ||
var numRemovedSoFar = 0; | ||
for (var i = 0; i < indexesToRemove.length; i++) { | ||
var indexToRemove = indexesToRemove[i] + numRemovedSoFar; | ||
var indexToRemove = indexesToRemove[i] - i; | ||
conjunctsOrDisjuncts.splice(indexToRemove, 1); | ||
@@ -608,0 +607,0 @@ }//</for> |
{ | ||
"name": "waterline", | ||
"description": "An ORM for Node.js and the Sails framework", | ||
"version": "0.13.1-0", | ||
"version": "0.13.1-1", | ||
"homepage": "http://github.com/balderdashy/waterline", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
977231
14446