Fórum

java.lang.UnsupportedOperationException: query result offset is not support

Kieu Phong, modificado 11 Anos atrás.

java.lang.UnsupportedOperationException: query result offset is not support

New Member Postagens: 6 Data de Entrada: 12/12/11 Postagens Recentes
Hi everyone,

I am implementing pagination and I have problem with com.liferay.portal.kernel.dao.orm.QueryUtil class

When I call the method: public static List<?> list(Query query, Dialect dialect, int start, int end,boolean unmodifiable) in the above class:
When start = 0, the method work correctly
When start > 0 (example: start = 10) I get the error: java.lang.UnsupportedOperationException: query result offset is not supported

I see that this method use
query.setMaxResults(end - start);
query.setFirstResult(start);

so, it should be able to suport subset of return list but it doesn't.
Please help.
Thanks