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