Ah, right. I did not set that. Thanks!
My update goes something like this:
update one datasource, and inside that I update another datasource
I found it kind of strange that the response did not have the DataSource set (and apparently not the operator either).
Is there a way to make a request like this without having to manually set all these values in the DSResponse?
My update goes something like this:
update one datasource, and inside that I update another datasource
Code:
DSRequest request = new DSRequest(DataSources.EMPLOYEE_DS, DataSource.OP_UPDATE); request.setRequestContext(dsRequest.getRequestContext()); HashMap<String, Object> employeeUpdate = ... values to update the related datasource request.setValues(employeeUpdate); try { employeeUpdateResponse = request.execute(); DataSource ds = employeeUpdateResponse.getDataSource(); if (ds == null) { ds = dsRequest.getRPCManager().getDataSource( DataSources.EMPLOYEE_DS); employeeUpdateResponse.setDataSource(ds); employeeUpdateResponse.setProperty("operationType", DataSource.OP_UPDATE); //THIS WAS MISSING } DataSource.OP_UPDATE } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }
Is there a way to make a request like this without having to manually set all these values in the DSResponse?
Comment