nope you are right ... it's not useless ... apologies I *think* the problem is in mapping (conceptually) from a mental RDBMS model to a GAE DS model ... where "entity group" might be mistaken for "table" ...
:) On Aug 26, 3:02 pm, "Jason (Google)" <[email protected]> wrote: > Why do you indicate that the documentation is useless? The links I included > above state this quite clearly: two entities will be in separate entity > groups by default, even if they're the same kind. Entity groups DO NOT > collect entities of the same kind. If you need transaction support, you'll > need to explicitly set one entity as the parent of the other, which > basically creates a hierarchy (tree) of entities -- this is an entity group. > In JDO/JPA, you do this using owned relationships which is covered in my > second link above. > - Jason > > > > On Tue, Aug 25, 2009 at 2:33 PM, Larry Cable <[email protected]> wrote: > > > I have exactly the same problem, I instantiate a number of @Entity > > objects > > (all of the same type) persist them, and flush them in the context of > > the same > > transaction. > > > Since they are all of the same type, and their are no relationships > > (although there is > > an @Embedded class/field) I would imagine that they are all modelled > > as being in the > > same entity group .. but apparently not. > > > The documentation is basically useless at this point ... > > > On Aug 15, 1:09 pm, Foreigner <[email protected]> wrote: > > > While trying to do a bulk update on my entities using JPA I get the > > > exception bellow. > > > I understand that you can't do a bulk update on different entity groups > > in > > > the same transaction but I guess I don't quite understand what an entity > > > group is and how I go about making all entities part of the same group I > > > want. > > > > Thanks for the help. > > > > fbr > > > > Illegal argument > > > org.datanucleus.exceptions.NucleusUserException: Illegal argument > > > at > > org.datanucleus.store.appengine.DatastoreExceptionTranslator.wrapIllegalArgumentException(DatastoreExceptionTranslator.java:42) > > > at > > org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put(RuntimeExceptionWrappingDatastoreService.java:106) > > > at > > org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:125) > > > at > > org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:94) > > > at > > org.datanucleus.store.appengine.DatastorePersistenceHandler.updateObject(DatastorePersistenceHandler.java:398) > > > at > > org.datanucleus.state.JDOStateManagerImpl.flush(JDOStateManagerImpl.java:4458) > > > at > > org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:2807) > > > at > > org.datanucleus.ObjectManagerImpl.markDirty(ObjectManagerImpl.java:2617) > > > at > > org.datanucleus.state.JDOStateManagerImpl.postWriteField(JDOStateManagerImpl.java:4241) > > > at > > org.datanucleus.state.JDOStateManagerImpl.setObjectField(JDOStateManagerImpl.java:2287) > > > at > > com.yicook.entities.TwitterDailyTip.jdoSetlastSet(TwitterDailyTip.java) > > > at > > com.yicook.entities.TwitterDailyTip.setLastSet(TwitterDailyTip.java:36) > > > at > > com.yicook.control.bco.TwitterStatusSetterBCO.resetTDT(TwitterStatusSetterBCO.java:60) > > > at > > com.yicook.control.bco.TwitterStatusSetterBCO.execute(TwitterStatusSetterBCO.java:40) > > > at > > com.yicook.control.ApplicationController.executeControllers(ApplicationController.java:61) > > > at > > com.yicook.control.ApplicationController.dispatch(ApplicationController.java:41) > > > at > > com.yicook.servlets.FrontController.doPost(FrontController.java:31) > > > at > > com.yicook.servlets.FrontController.doGet(FrontController.java:25) > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:693) > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > > > at > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) > > > at > > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) > > > at > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) > > > at > > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) > > > at > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) > > > at > > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > > > at > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > > > at > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) > > > at > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) > > > at > > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54) > > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) > > > at > > com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:306) > > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) > > > at org.mortbay.jetty.Server.handle(Server.java:313) > > > at > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) > > > at > > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) > > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) > > > at > > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) > > > at > > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) > > > at > > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) > > > at > > org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) > > > Caused by: java.lang.IllegalArgumentException: can't operate on > > > multiple entity groups in a single transaction. found both Element { > > > type: "TwitterDailyTip" > > > id: 77} > > > > and Element { > > > type: "TwitterDailyTip" > > > id: 78 > > > > }- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 [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 -~----------~----~----~----~------~----~------~--~---
