I'm using ERRest to provide access to a number of entities in my app. Updating 
values in one entity fails silently and I can't figure out where to look. I 
suspect this may not be related to ERRest but when I'm using the same model and 
classes in other 'more traditional' (for me) areas of my app, there are no 
problems. Other entities using the same method update fine and the other CRUD 
actions behave normally.

I perform an update request:

PUT /cgi-bin/WebObjects/Patrol.woa/ra/suite_runs/10 HTTP/1.1

<SuiteRuns>
  <priority>11</priority>
</SuiteRuns>


I'm using modified example code to handle the request:

public WOActionResults updateAction() {
                SuiteRun suiteRun = routeObjectForKey("suiteRun");              
                update(suiteRun, listFilter());
                editingContext().saveChanges();
                return response(suiteRun, showFilter());
        }

        public ERXKeyFilter updateFilter() {
                ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();
                filter.include(SuiteRun.TESTS);
                filter.include(SuiteRun.TEST_INVOCATIONS);
                return filter;
        }

The object to update looks OK, so does the EC used. update() appears to work 
and the new values are pushed into the EO. The EO isn't persisted to the 
database and the EC doesn't register any changes. As the EO is populated with 
the new values, a correct response is returned to the client. The save fail is 
silent and nothing appears in logs. 

Any ideas where to start looking?

Thanks,
Benjamin

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to