Hi,
Did anyone know if batch gets work with JDO, I'm trying desperately to do
that using the code presented here
http://gae-java-persistence.blogspot.com/2009/10/executing-batch-gets.html
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Book {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Key key;
}
public List getById(List keys) {
Query q = pm.newQuery("select from " + Book.class.getName() + " where
key == :keys");
return (List) q.execute(keys);
}
but I still see several datastore_v3.Get in the appstats of my application
I've tried also:
List<Key> keys = ...;
1/ Query q = pm.newQuery(Book.class,":keys.contains(key)");
return (List) q.execute(keys);
2/pm.getObjectsById(keys)
But none of them does a batch GET :( what I'm doing wrong?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine-java/-/ZASnFtvAo6MJ.
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.