Commit Graph

24 Commits

Author SHA1 Message Date
Blake Watters
fcb973056b Cleanup trailing whitespace. refs #743 2012-05-17 18:00:16 -04:00
Blake Watters
3fb2b023fa Integrate optimization for utilizing the managed object cache when connecting relationships. closes #693
Thanks to Ed McManus (emcmanus) for the implementation.
2012-05-16 19:09:05 -04:00
Blake Watters
a01d47316c Added new logging component for Core Data cacheing subsystem. Fixed performance degradation in entity cache. Enabled RKManagedObjectCacheing callbacks to accelerate mapping, disabled processPendingChanges 2012-05-04 23:19:14 -04:00
Blake Watters
4b394f8c1e Prevent creation of duplicate managed objects due to notifications from the MOC failing to be posted often enough. refs #661 2012-04-23 00:15:08 -04:00
Blake Watters
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
ddf2cb1a79 Added support for connecting relationships where the destination entity does not have an inherited
managedObjectClass. refs #627 [AWAITING TESTS]
2012-04-03 23:39:42 -04:00
Blake Watters
67d5cf08c1 Log the name of the entity during failure to connect relationships 2012-04-03 23:39:42 -04:00
Blake Watters
0d709dbc07 Migrate dangling invocations of NSLog -> RKLog. refs #578 2012-03-20 20:43:14 -04:00
Blake Watters
1bd3bfd514 Fix retain cycle issue with queued relationship connection. fixes #588 2012-03-12 20:42:52 -04:00
Charlie Savage
0337689343 Make sure that ConnectRelationship is using the correct managed object context. Currently it assumes the default managedObjectContext, but that is not correct when multiple databases are open using different managedObjectContexts. 2012-03-07 23:35:16 -07:00
Blake Watters
4d48ef4729 Fixed breakage in OS X support 2012-02-15 17:48:59 -05:00
Blake Watters
789b0b99eb Implemented support for hydrating to-many relationships. closes #284 2012-02-15 11:09:21 -05:00
Jeff Arena
847ed50bc0 Reduce log level for a log entry in RKManagedObjectMappingOperation 2012-02-10 16:30:54 -05:00
Blake Watters
3d0f0ab39e Introduced the RKTableController component for iOS.
RKTableController provides a flexible, integrated system for driving iOS table views using
the RestKit object mapping engine. Local domain objects can be mapped into table cells within a
collection or presented for editing as part of a form. There are three flavors of table controllers
available:

* Static Tables: RKTableController can be used to render simple static tables that are composed of RKTableItems
presented in RKTableSections. Table items can quickly be built and added to a table without a backing model
or can have content object mapped into them for presentation.
* Network Tables: RKTableController can also render a table with the results of a network load. The typical use
case here is to have RestKit retrieve a JSON/XML payload from your remote system and then render the content into
a table.
* Core Data Tables: RKFetchedResultsTableController can efficiently drive a table view using objects pulled from a
Core Data managed object context. Typical use-cases here are for the presentation of large collections that are
pulled from a remote system, offering offline access, or speeding up a UI by using Core Data as a fast local cache.

RKTableController supports a number of bells and whistles including integrated searching/filtering and pull to refresh.
2012-02-10 16:30:54 -05:00
Jeff Arena
aac9abc0ad Audit uses of setValue:forKey: in mapping operations and replace with setValue:forKeyPath: where appropriate. Fixes #421. 2012-01-21 13:11:35 -05:00
Blake Watters
479864902b Fixed all build warnings on OS X Framework target 2011-12-08 23:23:20 -05:00
Blake Watters
563f5e909b Updated all example projects to build against the new project. Cleaned up header imports for flattened project structure 2011-12-02 09:26:36 -05:00
Blake Watters
5b718890ac Checking in work in progress on the library reorganization 2011-12-02 09:26:35 -05:00
Blake Watters
0b5233916a Fixed bug where relationship connection was working off of source keyPath instead of destination (i.e. relationship name). fixes #357 2011-09-20 19:20:19 -04:00
Blake Watters
70c73f2981 Fixed issue with order dependence in Core Data connections. fixes #173
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.
2011-09-20 12:02:50 -04:00
Parker
c888af6f25 Added Apache License header to files in CoreData directory
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.
2011-09-07 11:55:17 -04:00
Blake Watters
4e03ba7bef Renamed Polymorphic mapping to dynamic mapping after consulting with the community. Dropped abstract superclass in favor of a RKObjectMappingDefinition protocol. Caught missing cases with dynamic object mapping + targetObject. Updated docs and method signatures to reflect the updates. 2011-07-31 19:37:42 -04:00
Blake Watters
670234b775 Added support for polymorphic object mapping (Github #105, #244). This enables you to dynamically map objects to different destination classes or using different mapping strategies via configuration or callbacks. See Docs/Object Mapping.md for details.
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
2011-07-30 16:00:36 -04:00
Blake Watters
f3c0995d5e Implementation of Object Mapping 2.0 design:
* 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
2011-06-11 19:26:56 -04:00