From 6e137283ecf53c3e62bca295bc419bbf83ca2ab3 Mon Sep 17 00:00:00 2001 From: Juan Date: Wed, 20 Jun 2018 09:53:13 +0200 Subject: [PATCH] salesPerson filter fixed --- services/loopback/common/methods/client/activeSalesPerson.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/loopback/common/methods/client/activeSalesPerson.js b/services/loopback/common/methods/client/activeSalesPerson.js index b5baa072f..31a2c7f7e 100644 --- a/services/loopback/common/methods/client/activeSalesPerson.js +++ b/services/loopback/common/methods/client/activeSalesPerson.js @@ -28,8 +28,8 @@ module.exports = Self => { if (where) { if (where.firstName) { - sqlWhere = `AND (em.firstName REGEXP ? OR em.name REGEXP ?)`; - let search = where.firstName.regexp; + sqlWhere = `AND (em.firstName LIKE ? OR em.name LIKE ?)`; + let search = where.firstName.like; params.push(search); params.push(search); }