Did you reverse the error and queries? In the first, you're getting a list of keys, so those aren't entities to have caused the multiple entity exception.
On Aug 1, 11:12 pm, Mauricio Aristizabal <aris...@gmail.com> wrote: > I was just trying retrieve a List of entities and do a .size() to get a > current count, but ran into this: > > Caused by: java.lang.IllegalArgumentException: can't operate on multiple > entity groups in a single transaction. found both Element { > > type: "Conversation" > > id: 37 > > } > > and Element { > > type: "Reply" > > id: 38 > > } > > It was very confusing because nowhere am I doing anything with Reply #38. > It happens only when I get the list like this (JPA): > > entityManager().createQuery("SELECT key FROM Reply o WHERE > o.conversationKey = :conversation").setParameter("conversation", > conversationKey).getResultList(); > > and NOT if I do it like this: > > entityManager().createQuery("SELECT o FROM Reply o WHERE > o.conversationKey = :conversation").setParameter("conversation", > conversationKey).getResultList(); > > Any idea why this is? > > I'm not blocked... I'll just keep a counter. Mainly wanted to share in case > someone else is stumped by this error. -- 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.