Since OM 2.0 connection of relationships happened during the object mapping operation
instead of aggregately at the end of the process. In this commit, we have introduced a lightweight
queue for deferring portions of the mapping operation until a larger aggregate mapping has completed.
The changes are as follows:
* Introduced RKMappingOperationQueue for queueing portions of mapping. This is a synchronous queue modeled off
of NSOperationQueue that does NOT use threading (for Core Data friendliness).
* RKObjectMappingOperation now has a RKMappingOperationQueue queue property that defaults to nil
* RKObjectMappingOperation instances built via RKObjectMapper will has a mapping operation queue
assigned to the property.
* If a queue is present, RKManagedObjectMappingOperation will use it to defer the connection of relationships.
* At the end of an RKObjectMapper process, the mapping operation queue used by all mapping operations created
during the process will be executed. This allows all relationships to be connected after all object creation
has completed.
The queue is general purpose, though currently only used for the connection of relationships.
The managedObjectContext helper method will now raise an exception if there is not a sharedManager or the current sharedManager does not have an objectStore configured.
Didn't add header to NSManagedObject+ActiveRecord.h,
NSManagedObject+ActiveRecord.m and RKManagedObjectCache.h .
NSManagedObject+ActiveRecord was adapted from someone else, and
RKManagedObjectCache has different code formatting. Will update those
once I get confirmation on them.
Other changes include:
* Eliminated the RKObjectFactory protocol and implementations. Object mapping instances themselves are
now responsible for instantiating target objects for mapping.
* Introduced RKObjectAbstractMapping superclass for RKObjectMapping and RKObjectPolymorphicMapping.
* Updated example applications to use block object loaders (RKTwitter and RKTwitterCoreData)
* Refactored method signatures of RKObjectMapper, RKObjectMapping, and RKObjectMappingProvider to reflect the
existence of abstract mapping types. This was necessary to make polymorphic mappings integrate cleanly.
* Fixed overlap in RestKit error domains between network and object mapping. fixes#208
* Introduces RKRequestCache for cacheing responses (supports ETag conditional GET, use cache if available, use cache on error, etc.) closes#75
* Updates to Three20 layer to eliminate need for intermediary TTTableItem classes closes#76
* Fixes to ensure iOS 3.x compatability:
* Switched compiler to Clang
* Updated conditional checks for UIBackgroundTask symbols to ensure runtime safety on iOS 3.x
* Removed unnecessary linkage against UIKit and CoreFoundation from library targets
* Fix for issue where RKRequest objects could become stuck in infinite loop within RKRequestQueue loadNextInQueue if you start
a request and then cancel immediately. On cancel only decrement loadCount if the request has start loading. refs #122
* Removed RestKit from inheritance hierarchy
* Mappings are implemented as concrete classes
* Mapper is much more flexible & powerful
* Much more robust error handling
* Serialization is reimplemented as an object mapping operation
* Added ability to serialize to JSON natively
* Reworked Core Data integration
* Simplified the codebase substantially
* Cleaned up various mismatches in method signatures that were preventing documentation generation
* Removed naked ampersands from comments as they cause XML parser failures during docset generation via appledoc
* Factored out display of alerts into RKAlert interface that hides the differences between UIKit and OS X Cocoa.
* Added macosx to supported platforms to enable build on OS X.
* Configured project to use conditional architectures to enable building on OS X and iOS from the same targets.
* Implemented a bare-bones OS X example app.
* Create `rake build` task for building RestKit against iOS and OS X SDK for quick testing.
Add a new class method that takes a directory parameter, and add a corresponding parameter to the private initializer. The other class methods pass nil for that new parameter. The value for the pathToStoreFile property is now calculated in the initializer, and stored in an instance variable.
Add RKManagedObjectStoreDelegate protocol and a delegate property. Right now, all of the notifications are of errors/failures. Some code has been restructured so that return values are always consulted BEFORE the error parameter is examined.
* Introduce RKObjectMappable#relationshipsToSerialize to define nested relationships to post
* New helper methods for working with relationship serializations.
* Extended Rails router to serialize nested objects according to Rails idioms