ZF2-263: Zend\Db Cannot use Expression in insert()
Description
$this->insert(
array(
'article_id' => (int) $articleId,
'name' => $name,
'email' => $email,
'text' => $text,
'commented_on' => new Expression('NOW()'),
)
);
Expected result: Insert current datetime to DB Actual result: Catchable fatal error: Object of class Zend\Db\Sql\Predicate\Expression could not be converted to string in I:\xampp\zf2\library\Zend\Db\Adapter\Driver\Pdo\Statement.php on line 255
Another occurence http://zend-framework-community.634137.n4.nabble.com/…
Comments
Posted by Evan Coury (evan.pro) on 2012-06-25T22:03:16.000+0000
Resolved with https://github.com/zendframework/zf2/pull/1561