【发布时间】:2017-11-22 15:05:02
【问题描述】:
当它尝试插入 audit_lo 表时出现此错误
执行 'INSERT INTO audit_log (id, type_id, type, description, event_time, user, impersonatingUser, ip) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [5, “security.interactive_login”,“security.interactive_login”, “security.interactive_login”,“2017-11-22 12:56:48”,“bmellor”,空, "::1"]:
还有这个日志
未捕获的 PHP 异常 Doctrine\DBAL\Exception\SyntaxErrorException: “执行 'INSERT INTO audit_log (id, type_id, type, description, event_time, user, impersonatingUser, ip) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' with params [5, “security.interactive_login”,“security.interactive_login”, “security.interactive_login”,“2017-11-22 12:56:48”,“bmellor”,空, "::1"]: SQLSTATE[42601]: 语法错误: 7 错误: or 中的语法错误 接近 «user» LINE 1: ..._log (id, type_id, type, description, event_time, 用户, impe ... ^" at /project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php 第 70 行
我遵循here 和config.yml 中的所有步骤
xiidea_easy_audit:
entity_class : AppBundle\Entity\AuditLog #Required
user_property : username #Optional
doctrine_entities : #Optional
AppBundle\Entity\SomeEntity : [created, updated, deleted]
events : #Optional
- security.interactive_login
编辑
环境 PHP 7.1.11 Symfony 3.3.X PostgreSQL 9.6 EasyAuditBundle ^1.4
【问题讨论】:
标签: symfony doctrine-orm audit