Hi All,
I am new to requestfactory and currently working on sample to
understand it better. I have created simple entity at server side and
trying to check create,update & delete operation from the client
side.I could see create and delete working as expected but when it
comes to update it is failing with unique constraint error because
somehow requestfactory is calling a INSERT query instead of UPDATE
query.Please let m eknow if I am missing anything here.
here is my code snippet:
CcfSearchCriteriaRequest request = requestFactory.ccfSCRequest();
request.findCcfSearchCriteria(Long.valueOf(5L)).fire(new
Receiver<CcfSearchCriteriaProxy>() {
@Override
public void onSuccess(CcfSearchCriteriaProxy response) {
CcfSearchCriteriaRequest request1 = requestFactory.ccfSCRequest();
CcfSearchCriteriaProxy editCriteria = request1.edit(response);
editCriteria.setDescription("SOmething");
request1.persist().using(editCriteria).fire(new Receiver<Void>() {
@Override
public void onSuccess(Void ignore) {
Window.alert("Updated");
}
});
}
@Override
public void onFailure(ServerFailure error) {
}
});
Thanks in advance,
satish
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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-web-toolkit?hl=en.