From dd91a00bb467ab5b2b6222879210771504efd99d Mon Sep 17 00:00:00 2001 From: Christopher Tjong Date: Thu, 26 Apr 2018 12:26:14 -0700 Subject: [PATCH] where clause fix --- adapters/db/mysqldb.js | 6 +++++- package.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/adapters/db/mysqldb.js b/adapters/db/mysqldb.js index f175109..a6e8eac 100644 --- a/adapters/db/mysqldb.js +++ b/adapters/db/mysqldb.js @@ -430,7 +430,7 @@ module.exports = query.append("`" + condObj.entity + "table`.`" + condObj.fieldName + "`" + condObj.operator + "?", condObj.fieldValue); } } - else + else if(condObj.children.length > 0) { query.append("("); for (var i = 0; i < condObj.children.length; i++) @@ -441,6 +441,10 @@ module.exports = } query.append(")"); } + else + { + query.append("1=1"); + } } this.quickFind = quickFind; diff --git a/package.json b/package.json index 657f3ec..5309d01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orion-api", - "version": "1.2.9", + "version": "1.2.10", "description": "REST API server application", "main": "index.js", "repository": {