Pagination with MyBatis

Hi ,
I want to use mybatis for some custom queries on flowable database.
Anybody used mybatis pagehelper plugin for pagination?

1 Like

No, haven’t used that plugin. But you can do custom MyBatis queries as described here: Advanced · Flowable Open Source Documentation

2 Likes

Is there mistake in docs Advanced - XML based Mapped Statements ?

Example of AttachmentQuery

@Override
  public long executeCount(CommandContext commandContext) {
    return (Long) commandContext.getDbSqlSession()
                   .selectOne("selectAttachmentCountByQueryCriteria", this);
  }

  @Override
  public List<Attachment> executeList(CommandContext commandContext, Page page) {
    return commandContext.getDbSqlSession()
            .selectList("selectAttachmentByQueryCriteria", this);
  }

There is no such method like getDbSqlSession() in CommandContext class

In example on GitHub there is CommandContextUtil class used.

This PR should fix the documentation issue.