cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
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:

http://cayenne.apache.org/doc30/paginated-queries.html

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.

Thanks!

mrg


On Fri, Mar 30, 2012 at 5:08 AM, Sheldon <waldemargolder@web.de> 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: http://cayenne.195.n3.nabble.com/select-over-PKs-tp3870305p3870305.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.

Mime
View raw message