成功解决:Can not find owner from table.

使用shardingsphere+mybatis-plus时执行子查询是报错。例如:

select * from (
    select id from test 
) t GROUP BY t.id

执行会报错

解决方案

出现以上的原因是shardingsphere的bug

  1. 去掉shardingsphere就可以了

参考:https://github.com/baomidou/mybatis-plus/issues/2585

  1. 去掉别名
select * from (
    select id from test 
) t GROUP BY id

你可能感兴趣的:(消灭Bug,java)