-
Choerodon平台版本:0.5.0
-
运行环境(如localhost或k8s):localhost
-
遇到问题时的前置条件:
-
问题描述:
请尽量详细的描述您遇到的问题,以便我们能更快速的提供解决办法。
如:BaseMapper中的selectCount()和多语言起冲突,造成ambiguous错误。
-
报错信息(请尽量使用代码块的形式展现):
SQL: SELECT COUNT(uom_id) FROM hmdm_uom b LEFT JOIN hmdm_uom_tl t ON (b.uom_id=t.uom_id AND t.lang=?) WHERE tenant_id = ? AND uom_code = ?
Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘uom_id’ in field list is ambiguous
; SQL []; Column ‘uom_id’ in field list is ambiguous; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘uom_id’ in field list is ambiguous
- 原因分析:
count使用了主键,应该修改为*