Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: ch4mp
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

setFirstResult also sets last result (Long.MAX_VALUE in case of JPQLQuery) which might not be desirable

Created: 19/Sep/13 03:12 PM   Updated: 23/Oct/13 11:56 AM   Resolved: 08/Oct/13 08:51 PM
Component/s: Queries
Affects Version/s: None
Fix Version/s: 3.2.7

File Attachments: 1. Zip Archive (9 kB)

Environment: all

Forum Thread URL:,7590
Datastore: HSQL, H2

 Description  « Hide
I get various SQL exception thrown by H2 or HBase when a call to JPAQuery.setFirstResult() is called because this method also sets a max number of results to Long.MAX_VALUE

Sort Order: Ascending order - Click to sort in descending order
ch4mp added a comment - 19/Sep/13 03:16 PM
Minimal Maven project with JUnit test showing the issue.
Contains .project and .properties files for SpringsourceToolSuite 3.3.0.RELEASE (Eclipse with datanucleus plugin)

Andy Jefferson added a comment - 08/Oct/13 05:34 PM
H2/HSQLDB don't allow use of an offset with no count. What exactly do you expect it to put in ? (Long.MAX_VALUE) is the most logical (to me)

Andy Jefferson added a comment - 08/Oct/13 08:51 PM
SVN uses Integer.LONG_VALUE when using H2/HSQLDB and not set count

ch4mp added a comment - 08/Oct/13 09:00 PM
My vision of the issue is more that I don't expect "setLastResult()" to be called when I call "setFirstResult()".
I know this is due to underlying API that only exposes setRange, but this is an issue to me.

Sorry, I was away from my computer today and may come late...

Andy Jefferson added a comment - 09/Oct/13 10:10 AM
Your "test" passes. If you had something else in mind, you design a better test