JDOQL isn't SQL, so I'm not surprised that this isn't working. It's not
possible to retrieve only parts of an entity, so this syntax wouldn't have
made a whole lot of sense. An alternate method of doing a Key only query is
to use the low-level API:

http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.html#setKeysOnly()

<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.html#setKeysOnly()>When
you form a query, set it to Keys only rather than retrieving complete
entities. What this mean is that this only hits your indexes, returning the
subset of keys that match. You can then use these Keys as you would normally
use them.

On Fri, Dec 25, 2009 at 5:38 PM, giridhar kannan <g.giridharkan...@gmail.com
> wrote:

> hi all,
>    i would like to know how to use the query
>
>    <b>" select __key__ from Class-Name "</b> in java .
>     The same syntax is not working, it shows the following
>    <b> PrimaryExpression should be a VariableExpression with name
> __key__ </b>
>    Please do help me.
>
> Thank you.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.


Reply via email to