Hi Marton. Yes, this performs a batch get which retrieves all entities in
parallel, which should be much more efficient than fetching sequentially
with getObjectById.
- Jason

2009/9/21 Marton Papp <[email protected]>

>
> Hi Max,
>
> I am surprised that this actually works. :)
>
> I could not find the documentation describing this feature. Do you
> know how is this implemented? Is it more efficient than just calling
> getObjectByIdentity  N (=listOfKeys.size()) times?
>
> Thanks,
> Marton
>
>
> On Sep 8, 9:14 pm, Max Ross 
> <[email protected]<maxr%[email protected]>>
> wrote:
> > You can do the equivalent of a low level batch get with jdoql:
> >
> >     Query q = pm.newQuery("select from " + Flight.class.getName() + "
> where
> > id == :ids");
> >     @SuppressWarnings("unchecked")
> >     List<Flight> flights = (List<Flight>) q.execute(listOfKeys);
> >
> > Hope this helps,
> > Max
> >
> > 2009/9/6 Zhi Le Zou <[email protected]>
> >
> > > Hi,
> > > I have a class Foo defined as below:
> >
> > >                               public class Foo{
> >
> > >                                           @PrimaryKey
> > >                                           @Persistent(valueStrategy=
> > > IdGeneratorStrategy.IDENTITY)
> > >                                           private String fooID;
> >
> > >
>  ...............................
> >
> > >                               }
> >
> > > Now, I have a list of IDs of the Foo entities, is it possible to
> retrieve
> > > the corresponding collection of Foo entities in a single query? I found
> the
> > > in the documentation, it says logic "or" and "IN" are not supported in
> the
> > > java version app engine sdk, although it is supported in the python
> version.
> >
> > > Thanks in advance :-)
> >
> > > --
> > > Best Regards
> > > Robin (邹志乐)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to