js-core-data
Advanced tools
Comparing version 1.3.15 to 1.3.16
@@ -79,3 +79,8 @@ // Generated by CoffeeScript 1.10.0 | ||
predicates = []; | ||
if (Array.isArray(object)) { | ||
if (typeof object === 'string') { | ||
object = new Predicate('(' + object + ')'); | ||
} | ||
if (object instanceof Predicate) { | ||
return object.toString(this.tableAlias); | ||
} else if (Array.isArray(object)) { | ||
for (i = 0, len = object.length; i < len; i++) { | ||
@@ -82,0 +87,0 @@ item = object[i]; |
{ | ||
"name": "js-core-data", | ||
"description": "ORM inspired by Apple's Objective-C CoreData", | ||
"version": "1.3.15", | ||
"version": "1.3.16", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -97,2 +97,7 @@ var assert = require("assert"), | ||
}); | ||
it('should correctly parse nested predicate object',function(){ | ||
var predicate = new Predicate({aa:'aa',bb:'bb'}); | ||
var predicate2 = new Predicate([{xx:'xx'},predicate,'SELF.test = 10']); | ||
assert.equal(predicate2.toString(),'((SELF.xx = \'xx\') AND (SELF.aa = \'aa\' AND SELF.bb = \'bb\') AND (SELF.test = 10))'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
498517
7614