[appengine-java] Re: Query a collection of entities with their IDs

2009-09-22 Thread Jason (Google)
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 > > Hi Max, > > I am surprised that this actually works. :) > > I could not find the documentation

[appengine-java] Re: Query a collection of entities with their IDs

2009-09-21 Thread Marton Papp
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 wrote: > Y

[appengine-java] Re: Query a collection of entities with their IDs

2009-09-21 Thread Zou Zhi Le
Max, thanks, this works pretty well for me :-) On Sep 9, 3:14 am, Max Ross 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 fligh

[appengine-java] Re: Query a collection of entities with their IDs

2009-09-16 Thread Max Ross
Bulat, Does that work for you? If so, could you please post an example? Thanks, Max 2009/9/16 Bulat Sirazetdinov > > Use one of the getObjectsById methods - just pass a collection of IDs > as a parameter. > > On Sep 7, 5:54 am, Zhi Le Zou wrote: > > Hi, > > I have a class Foo defined as belo

[appengine-java] Re: Query a collection of entities with their IDs

2009-09-16 Thread Bulat Sirazetdinov
Use one of the getObjectsById methods - just pass a collection of IDs as a parameter. On Sep 7, 5:54 am, Zhi Le Zou wrote: > Hi, > I have a class Foo defined as below: > > public class Foo{ > > @PrimaryKey >

[appengine-java] Re: Query a collection of entities with their IDs

2009-09-08 Thread Jason (Google)
http://groups.google.com/group/google-appengine-java/browse_thread/thread/e881ba0220ed8e9a/5a46b73f435f342a Please try not to double-post in the future. Thanks, - Jason 2009/9/6 Zhi Le Zou > Hi, > I have a class Foo defined as below: > > public class Foo{ > >

[appengine-java] Re: Query a collection of entities with their IDs

2009-09-08 Thread Max Ross
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 flights = (List) q.execute(listOfKeys); Hope this helps, Max 2009/9/6 Zhi Le Zou > Hi, > I have a