From eac309696d65aff39c78d1d1196dceea6d12bc25 Mon Sep 17 00:00:00 2001 From: torleif Date: Fri, 25 Jul 2014 21:25:54 +1200 Subject: [PATCH] FIX postgres filter on non text fields - on branch 1.1 See https://github.com/torleif/silverstripe-postgresql/commit/7626d74beebe28bc48440f75195a1a14330c8cc3 --- code/PostgreSQLDatabase.php | 1 + 1 file changed, 1 insertion(+) diff --git a/code/PostgreSQLDatabase.php b/code/PostgreSQLDatabase.php index 2a9dc08..329a032 100644 --- a/code/PostgreSQLDatabase.php +++ b/code/PostgreSQLDatabase.php @@ -2108,6 +2108,7 @@ class PostgreSQLDatabase extends SS_Database { } else { $comp = ($caseSensitive === true) ? 'LIKE' : 'ILIKE'; if($negate) $comp = 'NOT ' . $comp; + $field.='::text'; } return sprintf("%s %s '%s'", $field, $comp, $value);