Check this out
http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html
Key is special datatype and you will need to use help API by Google to
re-create the key before passing it in.

On Sun, May 30, 2010 at 9:47 PM, Dormand <[email protected]> wrote:

> Hi, I have a persistance class. now i want to query with its key and
> other one field.
> I have tried in this waya
>
> Query qry2 = pm.newQuery(File.class);
> qry2.setFilter("key == keyParam");
> qry2.setFilter("initialVersion <= version");
> qry2.declareParameters("com.google.appengine.api.datastore.Key
> keyParam, long version");
>
> fileList = (List<File>) qry2.execute(key, version);
>
> but it do not show any result
>
> --
> 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]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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