Re: [appengine-java] Replace an object in the datastore with another not currently in the datastore?

2010-09-09 Thread Ikai L (Google)
With the low-level API, you would just set the Key of the old object to the one one and persist it. With managed persistence via PersistenceManager or EntityManager, I believe you can set a key and merge (but I'm not sure off the top of my head). On Wed, Sep 8, 2010 at 12:43 PM, Shaun

[appengine-java] Replace an object in the datastore with another not currently in the datastore?

2010-09-08 Thread Shaun
This might be very obvious, but imagine you have an object in the datastore that you simply want to to replace with another, i.e. keep the same key, just replace all the field values. Is there any easy way to do this without setting each field value of the datastore object with field values of the