原生脚本查询查找ID集合
spring data jpa 原生脚本查询bigInteger/long
实体ID为long型,选择利用long型接收

jpa不报错,也能正常接收到结果集。

后续操作:
List a ;

List b 为获取的结果集

a.remove(b);

得不到想要的结果。debug发现b接收到的结果集内部数据格式为bigInteger(数据库格式为bigInt)

类型不一致导致无法从a中移除b。程序运行一切正常。

解决:
改成用bigInteger接收结果集,转成long格式,再remove

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2022-01-16
  • 2022-03-04
  • 2021-05-19
  • 2021-10-06
猜你喜欢
  • 2021-11-09
  • 2022-12-23
  • 2022-01-21
  • 2021-05-10
  • 2021-08-17
  • 2021-07-15
  • 2022-12-23
相关资源
相似解决方案