You just need to retrieve it, change it and close the persistence manager.
No makePersistent method needed.
For example:
public void updateEmployeeTitle(User user, String newTitle) {
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
Employee e = pm.getObjectById(Employee.class, user.getEmail());
e.setTitle(newTitle);
} finally {
pm.close();
}
}
If you're using Datastore , the principe is the same.
On 2 July 2011 18:10, Swaminathan <[email protected]> wrote:
> Hi,
>
> This is swaminathan, am now working on GAE/J. I am happy to deploy an
> application in cloud using GAE.
>
> In my project, i have just created a record in the data store and i
> need to update/overwrite the record.
>
> When i create a record, i get a auto generated Key. I have a query
> like 'How to update/overwrite the data in the record.
>
> Can any one help me out.
>
> Thank You
>
> --
> 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.
>
>
--
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.