当前使用版本(必填,否则不予处理)
3.3.2
该问题是如何引起的?(确定最新版也有问题再提!!!)
删除数据库里的数据时(物理删除),受影响的行数总是返回0行。
重现步骤(如果有就写完整)
我使用了如下两种方式,都无法成功删除数据,以下是我的代码:
@Override
public boolean deleteById(String channelId) {
boolean removeByIdStatus = super.removeById(channelId);
QueryWrapper<Channel> wrapper = new QueryWrapper<>();
wrapper.eq("id", channelId);
boolean removeStatus = super.remove(wrapper);
return removeStatus;
}
报错信息
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@359f5875] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@1409619689 wrapping com.mysql.cj.jdbc.ConnectionImpl@66a7b2d] will not be managed by Spring
==> Preparing: DELETE FROM channel WHERE id=?
==> Parameters: yrjfjxl(String)
<== Updates: 0
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@359f5875]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@336b985c] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@2088252084 wrapping com.mysql.cj.jdbc.ConnectionImpl@66a7b2d] will not be managed by Spring
==> Preparing: DELETE FROM channel WHERE (id = ?)
==> Parameters: yrjfjxl(String)
<== Updates: 0
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@336b985c]
Comment From: miemieYaho
和mp无关,自己排查