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

【已解决】字段名关键词bug #13

Closed
ydq opened this issue Oct 22, 2021 · 0 comments
Closed

【已解决】字段名关键词bug #13

ydq opened this issue Oct 22, 2021 · 0 comments

Comments

@ydq
Copy link
Contributor

ydq commented Oct 22, 2021

PS:使用autoResultMap = true 解决了


旧项目切mapper时发现了一个问题

曾经某个字段是个关键词 【order】结果生成的sql出现问题。

eg:

@Entity.Column(value = "order")
Integer order;

上述的注解查询时会输出SQL 【SELECT order FROM xxx】 order 关键词 导致sql错误,这个可以理解

@Entity.Column(value = "`order`")
Integer order;

上述的注解查询时会输出SQL 【SELECT `order` AS order FROM xxx 】 order 关键词 导致sql错误,个人觉得这个不应该加 AS 才对

@ydq ydq changed the title 字段名关键词bug 【已解决】字段名关键词bug Oct 22, 2021
@ydq ydq closed this as completed Oct 22, 2021
@ydq ydq reopened this Oct 22, 2021
@ydq ydq closed this as completed Oct 22, 2021
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