Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

about slice query with paging. the result have some wrong

fengyi

2013-07-03

Replies: Find Java Web Hosting

Author LoginPost Reply
hello everyone:
  I very like openJPA slice . and in our project, slice plays a import
role.
but when i configured slice. and query with paging. the result have some
mistake.
db is mysql-5.5。 i have two db ,configured for slice. when i query the
pageno gt 1 ,then the query result
goes wrong . i think this because of slices excute the paging query
individually,and then,the program merge the each slice result.
for example:
my whole data is : 1,2,3,4,5,6,7,8,,9,10,11,12
two slice.
the first slice holds data 1,3,5,7,9,11 and the second slice holds data
2,4,6,8,10,12
pageSize is 2.
page 1 result is 1,3 (1,3,2,4)
page 2 result is 5,7 (5,7,6,8)
page 3 result is 9,1 (9,11,10,12)

some data missed.

my team solution is use a delegate query when invoke the query page
interface. Cooperate with query Cache, the method can resolve our problem
temporarilly.
any one have more advice?



--
Sent from the OpenJPA Users mailing list archive at Nabble.com.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.