Issue Details (XML | Word | Printable)

Key: NUCRDBMS-695
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: ch4mp
Votes: 0
Watchers: 1
Operations

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 datanucleus-limit-bug.zip (9 kB)

Environment: all

Forum Thread URL: http://www.datanucleus.org/servlet/forum/viewthread_thread,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

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)

ch4mp made changes - 19/Sep/13 03:16 PM
Field Original Value New Value
Attachment datanucleus-limit-bug.zip [ 12016 ]
Andy Jefferson made changes - 08/Oct/13 05:32 PM
Project DataNucleus API JPA [ 10171 ] DataNucleus Store RDBMS [ 10144 ]
Key NUCJPA-249 NUCRDBMS-695
Affects Version/s 3.3.2 [ 12014 ]
Component/s Queries [ 10142 ]
Component/s API [ 10181 ]
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

Andy Jefferson made changes - 08/Oct/13 08:51 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.2.7 [ 12022 ]
Resolution Fixed [ 1 ]
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.

P.S.
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

Andy Jefferson made changes - 23/Oct/13 11:56 AM
Status Resolved [ 5 ] Closed [ 6 ]