cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <>
Subject Re: select over PKs
Date Fri, 30 Mar 2012 12:17:32 GMT
Hi Sheldon,

Like Andrew, I think you meant "primary keys" rather than "private
keys".  I'm going to guess at what you really are trying to do, but I
may fail.  :-)

You can have Cayenne fetch primary keys only instead of full objects
by using a paginated query:

If your query returns 10,000 rows, you essentially have fetched 10,000
PKs.  When you access a "page" in the paginated query, Cayenne will
automatically inflate the objects on that page (and only the page you
accessed) with actual Java objects.

If this isn't what you are looking for, please explain more.



On Fri, Mar 30, 2012 at 5:08 AM, Sheldon <> wrote:
> Hello,
> can I fetch data from db with a list of private keys? One possibility is to
> do this with SQLTemplate and than create a SELECT statement.
> But I want to do this like:
> Cayenne.objectForPK(context, Class, List of PKs)
> Sheldon
> --
> View this message in context:
> Sent from the Cayenne - User mailing list archive at

View raw message