Hi All,

I stored an entity in the datastore and it has a property whose type
is "User". I am trying to query all the records belongs to a specific
user. However, I cannot get it done. In the data viewer, the User
property seems have string content but it is not! In data viewer, I
can use the following GQL to do the job.

SELECT * FROM dbrecord where owner = USER('a...@gmail.com')

However, it does not work in Java application. When I use the
following command, it failed saying USER cannot be recognized.

    PersistenceManager pm = PMF.get().getPersistenceManager();
    String query = "select from " + dbrecord.class.getName() + " where
owner==USER('a...@gmail.com')";
    List<dbrecord> dbrecords = (List<dbrecors>) pm.newQuery
(query).execute();

I have also tried the command below but it does not work either.

    String query = "select from " + dbrecords.class.getName() + "
where owner=='a...@gmail.com'";

Any thoughts?

--

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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to