实体中的expireTime字段是\ DateTime类型,我需要更新此字段,我的代码如下:
$query = $dq->update()
->set('u.token', $dq->expr()->literal($token))
->set('u.isDeleted', false)
->set('u.expireTime', $dq->expr()->literal($expireTime->format('Y-m-d H:i:s')))
->where('u.email= :email')
->setParameter('email', $email)
->getQuery();
但我收到以下错误:
stackoverfExecute query in BaseDao error:[Syntax Error] line 0, col 84: Error: Expected Literal, got ','
感谢您的帮助!