Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Kieu Phong
java.lang.UnsupportedOperationException: query result offset is not support
May 3, 2012 11:45 AM
Answer

Kieu Phong

Rank: New Member

Posts: 6

Join Date: December 12, 2011

Recent Posts

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