cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felix <felix.serr...@technicalnorms.com>
Subject paginated queries, setPageSize
Date Tue, 05 Apr 2011 13:55:43 GMT
Hi,

I have integrated cayenne with a web framework (wicket) and pagination is
crucial for the project we are implementing, however it doesnt seem to work,
and im not sure whether im doing something wrong or I dont not understand
the concept

(there are 1004 'Proposal' objects in the database)

When I do:
-------------
		SelectQuery q = new SelectQuery(Proposal.class);
		q.setPageSize(50);

		//FS: Casting WicketNotSerializableException with
SimpleIdIncrementalFaultList(cayenne return class)
		queryRows = new ArrayList(MCApplication.getContext().performQuery(q));
--------------
I expected Cayenne to get all the IDs and the first 50 objects (1st page),
however it seems it is fetching the 1004 objects. The log is the following:


INFO  - QueryLogger                - --- will run 1 query.
INFO  - QueryLogger                - --- transaction started.
INFO  - QueryLogger                - SELECT t0.ProposalID FROM Proposal t0
INFO  - QueryLogger                - === returned 1006 rows. - took 10 ms.
INFO  - QueryLogger                - +++ transaction committed.
INFO  - QueryLogger                - --- will run 1 query.
INFO  - QueryLogger                - --- transaction started.
INFO  - QueryLogger                - SELECT t0.ProposalID, t0.ProposalTS,
t0.CompanyFK, t0 FROM Proposal t0 WHERE (t0.ProposalID = ?) OR
(t0.ProposalID = ?)............... - prepared in 30 ms.
INFO  - QueryLogger                - === returned 1006 rows. - took 130 ms.
INFO  - QueryLogger                - +++ transaction committed.

I'd appreciate if someone could help me out.

Thanks
Felix

--
View this message in context: http://cayenne.195.n3.nabble.com/paginated-queries-setPageSize-tp2779985p2779985.html
Sent from the Cayenne - User mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message