JFinal 4.2 Db.use().paginate()有bug

会吃掉select语句

Db.use(getDefaultDatasource()).paginate(currentPage, pageSize, selectClause, sqlExceptSelect, params.toArray());

构造的过程中,select 部分被丢弃了

打印语句如下,报错:

Sql: select count(*)  from main_role where 1=1

Sql:  from main_role where 1=1 limit 10 offset 0

com.jfinal.plugin.activerecord.ActiveRecordException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "from"

  位置:2

第二个Sql的select不见了!

评论区

JFinal

2019-07-02 16:39

关注一下分页的常见问题解决:
https://www.jfinal.com/doc/5-6

兰孝双

2019-07-03 20:04

谢谢大佬

热门反馈

扫码入社