You should be able to use makePersistentAll(). Does this not work?

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Thu, Sep 30, 2010 at 11:51 AM, Thomas Bean <[email protected]> wrote:

> I have about 5 JDO objects that I want to write to the datastore
> simultaneously.  From other posts, it looks like you have to use the
> low-level API to do this.
>
> Here is what I'm trying:
>
> ArrayList<Entity> objectsToSave;       // Create Entity objects from the
> keys of the JDO objects
> DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
> datastore.put(null, objectsToSave);
>
> The put call returns saying that all 5 objects were saved.  However, in
> AppStats I see that the objects get written when the persistence manager is
> closed too.
>
> 1.  Am I doing the batch writes correctly?  Did it actually save my
> modified JDO objects when calling put?
> 2.  What do I need to do to tell JDO that the objects have been saved so it
> doesn't try to write them again?
>
> Thanks.
>
>  --
> 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]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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

Reply via email to