We have hit a blocking problem while updating our codebase to support the LockerService. The steps to reproduce are:
- Component reads an sObject from Apex using the normal aura action/boxcar service
- User modifies two fields (one which was present in the SObject because it was queried and one which was not present but is a valid field for that SObject)
- This object is sent back to Apex to be saved but...
- The field which was absent in the loaded SObject does not appear in the Apex debug log but the other changed field is present
This problem only occurs with LockerService enabled.
Debugging the javascript, it appears that new values in objects are not stored in quite the same way as values received from Apex during page load.
This seems like a bug or is there a new way to set values in objects before sending them to Apex with LockerService enabled? Or maybe it's a bug in the serialisation of the data when sent back to Apex?
I can't find any examples of this in the documentation.
Thanks in advance for your help...