【发布时间】:2020-08-18 19:33:06
【问题描述】:
我有两个表表 1 和表 2。两者都有相同的名称 id 列。
因为它是一个左外连接查询,所以我必须使用别名。
在 sortKeys 中,如果我提到 id ,错误是
Caused by: org.postgresql.util.PSQLException: ERROR: column reference "id" is ambiguous
在 sortKeys 中,如果我提到 t1.id ,错误是
Caused by: org.postgresql.util.PSQLException: The column name t1.id was not found in this ResultSet.
如何处理此类查询?
我正在使用最新的 Spring Boot 版本 2.2.5.RELEASE
我在 stackoverflow 上看到了与此问题相关的其他帖子。但是,这些都在旧版本的 Spring Batch 中,因此我不应该遇到这个问题。
【问题讨论】:
-
您可以发布您正在使用的完整查询吗?