Hi king,

On Thu, Oct 22, 2009 at 6:19 AM, king <kingalpha...@gmail.com> wrote:
>
> Can anyone help me to figure out how to write a query to do contains
> (Key) in JDO?  Here is my scriplet:
> select from " + master.class.getName()
> + " where detailKeySet.contains('" + detail.getKey().toString() + "')"
>
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Master.class);
query.setFilter("detailKeySet.contains(:key)");
List<Master> list = (List<Master>) query.execute(detail.getKey());

Hope this helps,

Yasuo Higa

--~--~---------~--~----~------------~-------~--~----~
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-java@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