Open lmhaoye opened 7 years ago
MongoPaginate line - 35 if (count > totalRow) { this.count = (int) totalRow; } if (this.count <= 0 || this.page <= 0 || this.page > totalPage) { throw new RuntimeException("MongPage tips: (づ ̄ 3 ̄)づ count or page is error !"); } 当 查询结果为空,赋值 this.count为空,始终抛出下面异常
if (count > totalRow) { this.count = (int) totalRow; } if (this.count <= 0 || this.page <= 0 || this.page > totalPage) { throw new RuntimeException("MongPage tips: (づ ̄ 3 ̄)づ count or page is error !"); }
会在2.0调整这个判断机制。
另外修改时,传入对象,目前只有新版本只有replace了,replace是替换了document,而我只想传入一个想修改的对象进去,修改对应有值的属性,不更新数据库已存在但未传入的属性。
这个的话我会考虑在2.0中尝试实现,您也可以fork分支后尝试自行实现。
MongoPaginate line - 35
if (count > totalRow) { this.count = (int) totalRow; } if (this.count <= 0 || this.page <= 0 || this.page > totalPage) { throw new RuntimeException("MongPage tips: (づ ̄ 3 ̄)づ count or page is error !"); }
当 查询结果为空,赋值 this.count为空,始终抛出下面异常