Hi guys
I've got a list of id's and have to extract the appropriate objects
from the datastore. I use JPA, so it's posible to use method
EntityManager.find(..) :

Key key = KeyFactory.createKey(SomeEntity.class.getSimpleName(),
someId);
SomeEntity se = em.find(SomeEntity.class, key);

A number of id's id about 100-200, the whole number of entries in the
table is also small (several hundreds). The question is - may be
better to use query instead of find method. I just afraid that each
find method invocation requires server-datastore communication when
query requries only one(is it right?). If so how to do this.
The query em.createQuery("SELECT e FROM SomeEntity e WHERE (id=1 OR
id=2 OR id=3)");  returns nothing for some reason.

Any thoughts?
Thanks Maxim

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en.

Reply via email to