integer fields are not allowed in query filter
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 11 Mar 2016 09:34:49 +0000 (10:34 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 11 Mar 2016 10:30:35 +0000 (11:30 +0100)
... because pgsql is picky here. to allow them, we
would need a typecast in the query

Zend_Db_Statement_Exception: SQLSTATE[42883]: Undefined function: 7
ERROR:  operator does not exist: integer ~~* unknown
LINE 1: ...is_deleted" = 0) AND (("sales_customers"."number" iLIKE('%wo..

Change-Id: I1051bad84f88fba0604d59370f7fd8450ca80d08
Reviewed-on: http://gerrit.tine20.com/customers/2883
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Sales/Model/Customer.php

index 9020db4..7ab4bb5 100644 (file)
@@ -57,7 +57,9 @@ class Sales_Model_Customer extends Tinebase_Record_Abstract
             'number' => array(
                 'label'       => 'Customer Number', //_('Customer Number')
                 'group'       => 'core',
-                'queryFilter' => TRUE,
+                // TODO number can't be part of query filter because it is an integer
+                // for mysql it is ok, but for pgsql we need a typecast...
+                //'queryFilter' => TRUE,
                 'type'        => 'integer'
             ),
             'name' => array(