Query on class with composite ID returns all items regardless of maxResults setting #194

Closed
robgratz opened this Issue Mar 4, 2013 · 3 comments

Projects

None yet

2 participants

@robgratz
robgratz commented Mar 4, 2013

I have a class that has and ID composed of three values. I am able to do all operations (ie. read/write/query/delete/etc.) but when I tried to limit the number of returned items by specifying the maxResults field in the query, the value is ignored and all results are returned. This makes the library unusable for us because there is no way to page through results and the strategy of having a starting record as part of the query (ie. all values > some value) doesn't work because you can't limit the number of returned records. In looking at the CassQuery class, I noticed that the maxResults field is used in one of the paths within populateEntities(). Is there a technical reason why the other paths can't use the maxResults field? Thanks in advance.

@mevivs
Collaborator
mevivs commented Mar 5, 2013

setMaxResults() should work to limit on number of records. I will have a look.

Work over pagination over Cassandra from all modes(composite, native, via thrift) is in progress and probably will be released in 2.5

-Vivek

@mevivs mevivs was assigned Mar 5, 2013
@mevivs mevivs added a commit that referenced this issue Mar 5, 2013
@mevivs mevivs Fixed issue #194 4342d7c
@mevivs
Collaborator
mevivs commented Mar 5, 2013

Fixed. Please refer junit:
https://github.com/impetus-opensource/Kundera/blob/trunk/kundera-cassandra/src/test/java/com/impetus/client/crud/compositeType/CassandraCompositeTypeTest.java

Method onLimit() for reference.

Pagination will be supported by Kundera 2.5

-Vivek

@mevivs
Collaborator
mevivs commented Jul 11, 2013

Pagination is supported over Cassandra/HBase. It should be fine now.

-Vivek

@mevivs mevivs closed this Jul 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment