Donnerstag, 22. März 2012

Problem with Pagination and Ordering in JPA

Some days back we implemented ordering for different columns. There we faced the problem that result what is displayed is not the same as data is in the database. So we all thought we do not set the pagination parameters correctly or it is a problem in eclipse link.

I googled a little bit around. The problem is not pagination or eclipse link. The problem is how pagination works at all. Even when you fire the SQL directly to the database the problem occurs.

You have to use a unique id as well for ordering when pagination is used that the database will always sent the data back in the correct order.

see also Bug on using pagination on Oracle?

Keine Kommentare:

Kommentar veröffentlichen