ExampleMatcher ,在查询非int 或boolean 字段时要使用 withIgnorePaths() 忽略 int 和boolean 字段,要不然查询不到值

 

 这个今天使用mongo 查询数据遇到的bug, 这实体类中 有两个字段 oldExceptDesposit 和newExceptDeposit 是int 类型,查询不需要它们。可是在查询的时候不用withIgnorePath 忽略它们,就查询不到数据。 注意boolean 类型的字段也要 忽略一下

  哎,坑啊

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2021-04-03
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
相关资源
相似解决方案