Java 查询不返回结果——将本机查询与sqlite一起使用时

Java 查询不返回结果——将本机查询与sqlite一起使用时,java,spring,hibernate,sqlite,spring-data-jpa,Java,Spring,Hibernate,Sqlite,Spring Data Jpa,我在存储库中编写了以下方法 @Query(value = "delete from bin_values where id in (select bv.id from bin_values bv inner join bin b on bv.bin_id = b.id where b.stat_id = ?1)", nativeQuery = true) void deleteByStatId(long statId); 不幸的是,当我运行此函数时,出现以下错误: 线程“main”中出现异常

我在存储库中编写了以下方法

@Query(value = "delete from bin_values where id in (select bv.id from bin_values bv inner join bin b on bv.bin_id = b.id where b.stat_id = ?1)", nativeQuery = true)
void deleteByStatId(long statId);
不幸的是,当我运行此函数时,出现以下错误:

线程“main”中出现异常 org.springframework.orm.jpa.JpaSystemException:无法提取 结果集;嵌套异常是 org.hibernate.exception.genericjdbception:无法提取 结果集

原因:org.hibernate.exception.genericjdbception:无法 提取结果集

原因:java.sql.SQLException:查询不返回结果


当然,它没有结果,因为它是delete查询。如何强制执行?

可能会更改基础数据的查询方法需要更改。谢谢,这很有帮助!