Today we're going to cover a small 'gotcha' that I've seen on the forums a number of times: How do you execute a query where one or more of the parameters are of type com.google.appengine.datastore.api.Key? Did you know that a Key has two different string representations? You can see the first by calling Key.toString(): Key key = KeyFactory.createKey("Foo", 25); System.out.println(key); // prints