ddeboer/DdeboerSalesforceMapperBundle — pull request #9 by timo-p (2012-03-09 14:44:43+00:00)
Title: A new pull request based on your comments about the previous one

I modified SaveException so that it contains two properties: okModels and errors. OkModels is an array of successfully saved models and errors is an array containing instances of a new class Error. This class contains two properties model and errors. Model is the model which failed to save and errors is an array of errors returned by the Client related to that model.

I added SaveException class to the Client and modified Client::checkResult so that it throws a SaveException which contains the results of the Salesforce request.

Mapper::save catches the SaveExceptions thrown by the client and gets the results from the exception. Mapper::checkResult loops through these results and throws it's own SaveException if needed and inserts the model and errors to the Exception.