side note: the email archives are even more broken - while I can browse
the subjects, I cannot display the bodies of the messages.  This list
will
probably get more repeat questions/answers until it's fixed - sorry if
this
question is a duplicate...

-------

Using 0JB 0.9.9, I try to perform a query on 20+ objects where I set the
result limits using setStartAtIndex() and setEndAtIndex().  This
_almost_
works, but between the first and second query the last object of the
first
query is duplicated and returned as the first object of the second
query.
All other queries work fine.  Here is what my log looks like:

[15:00:33,421,Query] DEBUG findByCriteria: pageIndex=0, pageSize=5
[15:00:33,421,OJBORMManager] DEBUG findByCriteria: start=0, end=5
[15:00:33,421,OJBORMManager] DEBUG findByCriteria: query will return 20
rows
[15:00:33,431,OJBORMManager] DEBUG findByCriteria: found List of size 5
[15:00:33,431,QueryTest] DEBUG testQueryByCriteriaWithPaging: found 5
objects on page
[15:00:33,431,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1853
[15:00:33,431,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1854
[15:00:33,431,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1855
[15:00:33,431,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1856
[15:00:33,431,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1857   <--- NOTE ID
[15:00:33,431,Query] DEBUG findByCriteria: pageIndex=1, pageSize=5
[15:00:33,431,OJBORMManager] DEBUG findByCriteria: start=5, end=10
[15:00:33,431,OJBORMManager] DEBUG findByCriteria: query will return 20
rows
[15:00:33,441,OJBORMManager] DEBUG findByCriteria: found List of size 5
[15:00:33,441,QueryTest] DEBUG testQueryByCriteriaWithPaging: found 5
objects on page
[15:00:33,441,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1857   <--- DUPLICATED HERE
[15:00:33,441,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1858
[15:00:33,441,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1859
[15:00:33,441,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1860
[15:00:33,441,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1861
[15:00:33,441,Query] DEBUG findByCriteria: pageIndex=2, pageSize=5
[15:00:33,441,OJBORMManager] DEBUG findByCriteria: start=10, end=15
[15:00:33,451,OJBORMManager] DEBUG findByCriteria: query will return 20
rows
[15:00:33,461,OJBORMManager] DEBUG findByCriteria: found List of size 5
[15:00:33,461,QueryTest] DEBUG testQueryByCriteriaWithPaging: found 5
objects on page
[15:00:33,461,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1862   <--- OK HERE
[15:00:33,461,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1863
[15:00:33,461,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1864
[15:00:33,461,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1865
[15:00:33,461,QueryTest] DEBUG testQueryByCriteriaWithPaging:    found
ID=1866

My start and end indices look fine, but ID #1857 is returned in both the
first and second
queries.  Here is the code:

QueryByCriteria query = new QueryByCriteria(criteria);
log.debug("findByCriteria: start="+(pageIndex*pageSize)+",
end="+((pageIndex+1)*pageSize));
query.setStartAtIndex(pageIndex*pageSize);
query.setEndAtIndex((pageIndex+1)*pageSize);
log.debug("findByCriteria: query will return "+broker.getCount(query)+"
rows");
list = (List)broker.getCollectionByQuery(query);
log.debug("findByCriteria: found List of size "+list.size());

Any ideas why this is happening? Thanks,

-tim



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to