vertx-sql-client: quarkus-reactive-mssql-client - Pagination throws Error

Version

Quarkus - 2.7.2

Context

I am using pagination parameters, page Number and records per page to implement Pagination. For the same, below section of code is used. Integer pageNo = paginationDto.getPageNumber(); Integer recordsPerPage = paginationDto.getRecordsPerPage(); Page page = new Page(pageNo, recordsPerPage); query = query.page(page);

The query when executed, gives the error as attached herewith. Error Log.txt

Do you have a reproducer?

Have created the code inside the Quarkus Hibernate code base. PFA. hibernate-reactive-panache-quickstart.zip

Steps to reproduce

  1. Start server
  2. Run postman script -> AppUsers Pagination.postman_collection.json.zip
  3. See error log

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

Yes, it’s a bug in Hibernate Reactive. I’m going to create an issue. As a workaround, it will work if the query has an order by clause (or a filter):

@git4rputuval For your example, it will work if you change BaseDataSvc#createCriteriaQuery to:

	protected PanacheQuery<CommonAppUsersMdl> createCriteriaQuery(CommonAppUsersQueryDto tQuery) {
		BaseQueryVO baseQueryVO = getQuery(tQuery);
		logger.info(baseQueryVO.getQuery());
		PanacheQuery<CommonAppUsersMdl> query = getRepository()
                                 // It doesn't matter the field, as long as there is a Sort.by
				.find( baseQueryVO.getQuery(), Sort.by( "loginname" ), baseQueryVO.getQueryMap());

		query = setPagination(query, tQuery);
		return query;
	}

Hi,

Have tested this with the “Sort” option. It is working. So we are going ahead with this solution till you resolve the issue.

Regards,