>On Aug 12, 7:03 pm, datanucleus <andy_jeffer...@yahoo.com> wrote:
> Invalid JPQL (a Key cannot equal a List). This makes more sense
> Select c from ChatUser c where c.parentKey IN :parentKey

i tried the IN clause it get the same error.

   @Basic
   @Extension(vendorName="datanucleus", key="gae.parent-pk", value =
"true")
   private Key parentKey;

Query chatUserQuery = em.createQuery("Select c from ChatUser c where
c.parentKey IN (:parentKeyList)");

produces error
java.lang.ClassCastException: java.util.ArrayList cannot be cast to
com.google.appengine.api.datastore.Key
        at
org.datanucleus.store.appengine.query.DatastoreQuery.internalPkToKey(DatastoreQuery.java:
1484)


But when i use a normal key field everything works.
   @Basic
   private Key parentKey2;

Query chatUserQuery = em.createQuery("Select c from ChatUser c where
c.parentKey2 IN (:parentKeyList)");

the issue seems to be with the "gae.parent-pk" not the query.

-lp

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