Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

act-ebean生成的sql语句没有根据数据库方言处理关健字 #20

Open
liaozi opened this issue Oct 30, 2018 · 0 comments
Open

Comments

@liaozi
Copy link

liaozi commented Oct 30, 2018

最新版本发现一个问题:调用请求处理器 com.mycom.helloworld.UserController.list 时发生错误: Server Error

javax.persistence.PersistenceException: Query threw SQLException:关键字 'user' 附近有语法错误。
Bind values:[]
Query was:
select t0.id c0, t0.name c1, t0.age c2, t0.role_id c3, t0.create_date c4 from user t0

原因是生成的sql没有根据数据库方言加上关健字的处理。上面的sql语句中,由user是数据库的关健字,正确生成是应该在关健字前后加上[]。如:select t0.id c0, t0.name c1, t0.age c2, t0.role_id c3, t0.create_date c4 from [user] t0

使用的数据库产品是:sqlserver2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant