我阅读this page以使用propel orm管理我的symfony2.0登录表单。 在表单提交propel上返回此错误:
Warning! Unable to execute SELECT statement
[SELECT admin.ID, admin.USERNAME, admin.PASSWORD, admin.USERLEVEL, admin.MERCATO_ID
FROM `` `admin` WHERE admin.USERNAME=:p1 LIMIT 1]
[wrapped: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '']
应该是
FROM admin
而不是
FROM `` `admin`
为什么在select语句中有``在表名admin之前?
编辑
security.yml内容
security:
providers:
custom_provider:
id: papernet.secured.security.provider
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
login_firewall:
pattern: ^/login$
anonymous: ~
secured_area:
pattern: ^/
anonymous: ~
form_login:
check_path: /login_check
login_path: /login
logout:
path: /logout
target: /login
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"
access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: ROLE_ADMIN }
papernet.secured.security.provider
是我的自定义提供商,如指南