ShardingSphere查询报错-java.lang.IllegalStateException: Can not find owner from tabl

479 阅读1分钟

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

select * from ( select id from test ) 

t GROUP BY t.id

执行会报错

解决方案

出现以上的原因是shardingsphere的bug

  1. 去掉shardingsphere就可以了

参考:github.com/baomidou/my…

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

参考: blog.csdn.net/weixin_5211…