We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
gf版本:1.16
例:shop表 字段:id、userid、user_id
1、使用gf-cli生成模型--正常 2、查询数据
查看控制台时发现生成的sql为如图所示。
3、尝试指定字段
经过多次debug发现userid、user_id只会有一个字段有值,无法同时两个字段都有值,要么userid有,要么user_id有。
4、目前解决方法 修改生成的model增加uid字段,查询时使用user_id as uid。 由于业务需要不能改数据表字段,只能改model兼容处理
(涉及敏感信息不方便全部截图,英文太渣可能描述不清楚还是用中文好了)
The text was updated successfully, but these errors were encountered:
userid、user_id、userId、userID都认为是一个字段。
Sorry, something went wrong.
fix issue #1700
f1fee72
f9a3fa3
fix issue gogf#1700
5376955
6ba4698
No branches or pull requests
gf版本:1.16
例:shop表
字段:id、userid、user_id
1、使用gf-cli生成模型--正常

2、查询数据
查看控制台时发现生成的sql为如图所示。
3、尝试指定字段


经过多次debug发现userid、user_id只会有一个字段有值,无法同时两个字段都有值,要么userid有,要么user_id有。
4、目前解决方法
修改生成的model增加uid字段,查询时使用user_id as uid。
由于业务需要不能改数据表字段,只能改model兼容处理
(涉及敏感信息不方便全部截图,英文太渣可能描述不清楚还是用中文好了)
The text was updated successfully, but these errors were encountered: