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('[email protected]')
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('[email protected]')";
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=='[email protected]'";
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 [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.