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

Pull request merged to master