ZF2-420: In Update, only the last part of the where is used when an array provided
Description
When you do an update with the Zend\Db\Sql\Update class and you use the where function to give a clause, if you pass the clause as an array, only the last entry of the array is used.
Steps to repoduce the problem:
use Zend\Db\Sql\Update;
$update = new Update('table');
$update->set(array('fld1'=>'val1'));
$update->where(array('id1'=>'val1', 'id2'=>'val2'));
print ($update->getSqlString());
This code produce the following sql request:
UPDATE "table" SET "fld1" = 'val1' WHERE "id2" = 'val2'
instead of
UPDATE "table" SET "fld1" = 'val1' WHERE "id1" = 'val1' and "id2" = 'val2'
Comments
Posted by John Kelly (postalservice14) on 2012-07-26T17:27:03.000+0000
Pull request sent: https://github.com/zendframework/zf2/pull/2001
Posted by John Kelly (postalservice14) on 2012-07-27T14:59:31.000+0000
Pull request merged to master