Make your main data model class tied to the RKRequestSerializable protocol.
Then, when user input is validated, create the object as normal and set it as the params value in RKRequest, this will send your object as an HTTP body. For example, look at RKParams.m.
Also set the newly created object as the targetObject for RKObjectLoader. Thus, when your web service returns information (for example, a new unique identifier), it will be aimed at a new object and save a new unique identifier for this object without creating a duplicate.
Remove like dirt?
PS: Oh, be careful when mixing data classes with auto-generated kernels with custom code! I recommend mogen so as not to lose code with every change.
source share