ZF2-551: Db\Sql\Insert: use of __set add a new column as if already exists

Description

(sorry for my english :) )

For example, I have the Insert object as follows : [columns:protected] => Array ( [0] => Email [1] => Password [2] => Name [3] => FirstName ) [values:protected] => Array ( [0] => myaddress@gmail.com [1] => monmotdepasse [2] => Name [3] => My first Name )

Then I apply : $insert->Password = "mynewpassword",

So I have :

[columns:protected] => Array ( [0] => Email [1] => Password [2] => Name [3] => FirstName [4] => Password )

[values:protected] => Array
    (
        [0] => smelous@gmail.com
        [1] => monmotdepasse
        [2] => Mélous
        [3] => Stéphanie
        [4] => mynewpassword
    )

So I have now 2 columns "Password" and if I try to apply this query, I have this error message :

File:

/library/Zend/Db/Adapter/Driver/Pdo/Statement.php:216

Message:

SQLSTATE[42000]: Syntax error or access violation: 1110 Column 'Password' specified twice

Thank you very much :)

Comments

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2579