hi all

when i try to query using the gae.parent-pk IN a list, it is failing
with a ClassCastException below. i can use the parent key in a query
for a single value fine.

any ideas why this doesnt work?


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

this is the query
---------------------------
Query chatUserQuery = em.createQuery("Select c from ChatUser c where
c.parentKey=:parentKey");
chatUserQuery.setParameter("parentKey", keyList);
chatUserList = (List<ChatUser>) chatUserQuery.getResultList();

this is the JPA
----------------------
public class ChatUser {

                public static final String CLASS_NAME = "ChatUser";
                public static final String FIND_BY_PARENT_KEY =
"ChatUser.findByParentKey";

            @Id
            @GeneratedValue(strategy = GenerationType.IDENTITY)
            private Key key;

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

}


-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