Thankyou very much, that's a much clearer explanation than in the JDO API. Much appreciated!
Thanks Gemma On Apr 1, 4:52 pm, datanucleus <[email protected]> wrote: > > I'd like to avoid having to lookup the object using the Key and then > > updating it, and was wondering if I could get away with using the > > makePersistentAll method as a shortcut. The docs seem to imply I > > could do this if the object was detached, but not sure how it would > > behave if it was a re-constructed representation of the > > PersistenceCapable object as opposed to one retrieved directly from > > the datastore. > > Passing in a "transient" (non-detached, and non-managed) object (to > any makePersistent method) will attempt to persist it ... with the > identity that the object has. If its PK fields are set by you and that > 'id' corresponds to an object in the datastore then you will get a > JDOUserException since the object with that 'id' already exists. -- 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.
