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 view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine-java/-/2MXsnfqoEkYJ.
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.