-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom RKMappingOperationDataSource implementations #1442
Comments
Thanks for opening up the issue. I'll pull together my thoughts on this API shortly. |
Okay I have taken a look at this. I think all that you really need to do is: @interface RKObjectResponseMapperOperation
+ (void)registerMappingOperationDataSourceClass:(Class<RKMappingOperationDataSource>)class;
@end
@interface RKManagedObjectResponseMapperOperation
+ (void)registerMappingOperationDataSourceClass:(Class<RKMappingOperationDataSource>)class; You can use a static variable within the classes to implement the backing property. Behaviors:
|
Sounds good, I'll get on it and get back to you with either questions or a pull request! |
Implemented and works in my project (with RKObjectResponseMapperOperation). I'm not sure how useful it is on RKManagedObjectResponseMapperOperation but I included it anyway as you suggested. |
I overhauled the implementation and added sufficient test coverage. Enjoy! |
Great, thanks! |
…lementations with `RKResponseMapperOperation`. closes RestKit#1442, RestKit#1447
I would like to create my own RKMappingOperationDataSource implementation so that I can do some "Core Data like" things (e.g. updating existing objects, referencing relationships, etc) without actually involving Core Data.
A few different objects use RKMappingOperationDataSource, but they are all given either a RKObjectMappingOperationDataSource or RKManagedObjectMappingOperationDataSource instance created inside RestKit. I'm looking for a way to tell RestKit "here's my RKMappingOperationDataSource instance, please use it where necessary."
@blakewatters requested an issue be created and will provide an API sketch so that it fits properly in the system. I'll do the implementation and make a pull request.
Related Groups post: https://groups.google.com/forum/?fromgroups#!topic/restkit/JLGzjp4sjpM
Potentially related issues: #1092, #1248
The text was updated successfully, but these errors were encountered: