Commit Graph

74 Commits

Author SHA1 Message Date
Blake Watters
016f13dad0 Convert all tabs to four spaces. refs #743 2012-05-17 18:10:59 -04:00
Blake Watters
fcb973056b Cleanup trailing whitespace. refs #743 2012-05-17 18:00:16 -04:00
Blake Watters
5a53fdbf1e Added test coverage for creation of duplicate objects. refs #661 2012-04-30 20:31:28 -04:00
Blake Watters
9c6316cb45 Merge pull request #673 from timmehmainframe/patch-1
delegate would always be nil for managedObjectStore:didFailToCopySeedDat...
2012-04-17 23:53:43 -04:00
Blake Watters
e70bd93158 Recreate the MOC after deletion of persistent store using a seed database. fixes #676 2012-04-17 23:50:28 -04:00
Ed McManus
0df8c7ea73 Fix spelling of persistent store. 2012-04-14 11:48:22 -07:00
Aaron Crespo
22225cf8a0 Fixed Static analysis warnings. 2012-04-11 22:44:58 -04:00
Blake Watters
0d80bc3744 Switch default cacheStrategy to RKFetchRequestManagedObjectCache. closes #660 2012-04-10 15:16:28 -04:00
Blake Watters
dd852d90c3 Fix broken build from merge of 0.10.0 2012-04-06 00:03:35 -04:00
Blake Watters
a8483ca643 Merge branch 'release/0.10.0' into development 2012-04-04 20:19:43 -04:00
Blake Watters
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
61aefd5eda Restore default cache strategy to In Memory Cache 2012-04-04 08:20:21 -04:00
Blake Watters
8aedbeb1a5 Added helper methods for deleting managed object stores 2012-04-03 23:39:42 -04:00
Blake Watters
a545c3942b Integrated primaryKey extension to NSEntityDescription and refactored cache strategy
classes to eliminate issues with duplicated objects. closes #611, #612, #613, #618

* NSEntityDescription is now aware of the primaryKeyAttribute. Can be configured via
Interface Builder within Xcode or programatically.
* Added findByPrimaryKey: interface to the Core Data extensions.
* Relaxed dependencies on RKManagedObjectMapping across the system now that primaryKey is
available without a reference to the mapping.
2012-04-03 23:39:42 -04:00
Blake Watters
1b324ccc80 Temporary workaround for duplicated objects caused by RKInMemoryMappingCache. refs #612
There are some issues with the current implementation of the RKInMemoryMappingCache that
are allowing the creation of duplicated objects. This commit switches the default cacheStrategy
to RKFetchRequestMappingCache. The primary key branch (#613) contains architecture
improvements that allow for a robust fix to the issues in the memory based cache.
2012-03-31 16:44:35 -04:00
Blake Watters
947694deb1 Temporary workaround for duplicated objects caused by RKInMemoryMappingCache. refs #612
There are some issues with the current implementation of the RKInMemoryMappingCache that
are allowing the creation of duplicated objects. This commit switches the default cacheStrategy
to RKFetchRequestMappingCache. The primary key branch (#613) contains architecture
improvements that allow for a robust fix to the issues in the memory based cache.
2012-03-31 16:38:34 -04:00
Blake Watters
a740a9ce3b Drop RestKitCoreData.momd from the resources bundle. It is not currently viable to load the entities because you cannot reference entities in one model from another within Xcode. 2012-03-15 17:28:53 -04:00
Blake Watters
6efa73fa25 Fixed issues with accessing RestKitResources.bundle from within unit tests 2012-03-15 16:44:01 -04:00
Blake Watters
57183b364f Fix for warning emitted due to elimination of findOrCreateInstanceOfEntity:. Search Word functionality restored. closes #584
* Updates to the Core Data layer such that NSManagedObjectContexts now have a reference to the managed object store
they belong to.
* NSManagedObject instances can now return the managed object store they belong to.
* Relaxed the coupling to the sharedManager present within the RKSearchableManagedObject class.
* Expanded documentation of RKSearchableManagedObject
2012-03-14 17:08:02 -04:00
Blake Watters
88ab404ea1 Load the Core Data momd from RestKitResources.bundle 2012-03-09 17:48:51 -05:00
Blake Watters
1c59f5fc1e Cleaned up the naming on RKManagedObjectStore to primaryManagedObjectContext and managedObjectContextForCurrentThread 2012-03-09 09:02:21 -05:00
Jeff Arena
1cd22d5b33 First pass at replacing RKManagedObjectCache with a more flexible block approach that leverages the new resource path pattern matching approach to registering objectMappings. 2012-02-23 22:30:08 -05:00
Blake Watters
6c4461956f Recreate the retained MOC reference on store deletion 2012-02-23 20:49:59 -05:00
Blake Watters
5b655f1a23 Decoupled managed object contexts from the sharedManager instance. Various minor cleanups in CD. 2012-02-23 15:25:41 -05:00
Blake Watters
e904394b6b Miscellaneous cleanups 2012-02-17 16:34:03 -05:00
Blake Watters
4d48ef4729 Fixed breakage in OS X support 2012-02-15 17:48:59 -05:00
Blake Watters
36dfd9528e Change managed object context merge policy from NSOverwriteMergePolicy to NSMergeByPropertyStoreTrumpMergePolicy 2012-02-10 16:30:58 -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
Blake Watters
4a45a15da1 Fixed nearly all broken tests for OS X target 2011-12-09 00:30:34 -05:00
Blake Watters
479864902b Fixed all build warnings on OS X Framework target 2011-12-08 23:23:20 -05:00
Blake Watters
f5008ff9fe Cleaned up broken specs for iOS. 2011-12-02 09:26:35 -05:00
Blake Watters
5b718890ac Checking in work in progress on the library reorganization 2011-12-02 09:26:35 -05:00
Blake Watters
c29046075f Merge pull request #399 from Felixyz/validationErrorLogging
Log much-needed info when context fails to save
2011-10-12 20:03:59 -07:00
Felix Holmgren
a235610ab4 Log much-needed info when context fails to save
* Makes it much easier to debug Core Data validation problems
  * Adapted from code by Chris Lozach
  * See: http://stackoverflow.com/questions/1283960/iphone-core-data-unresolved-error-while-saving
2011-10-12 21:04:57 +02:00
Blake Watters
0c96aedc85 Fix use of reserved 'class' keyword that breaks import into Objective-C++. fixes #355
Added basic spec file that imports the public headers into an Objective-C++ source file.
2011-09-20 13:04:29 -04:00
Greg Combs
52e5a7b911 AppDirectory return value was incorrect for OSX Core Data. Fixes #350. Thanks @martijnthe 2011-09-18 12:00:23 -05: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
emil.wojtaszek
de5b7111a1 bug fix with wrong path to data store on mac 2011-08-25 20:38:33 -04:00
Blake Watters
7246afc998 Fixes to enable RestKit Core Data to be easily unit tested from a Unit Testing bundle. Improved thread safety in the request queue and fixed an issue where requests dispatched from background threads would not get callback methods due to thread termination. The request queue now guarantees requests are sent from the main thread. 2011-07-21 11:33:17 -04:00
Blake Watters
40eb842dcc Store new objects by lookupValue instead of primaryKeyValue. This avoids creation of duplicated objects the are manufactured by findOrCreateInstanceOfEntity: 2011-07-07 22:40:46 -04:00
Blake Watters
e86507f4ed Bug fix for potential invocation of setObject:forKey: with a nil key value 2011-07-05 16:30:16 -04:00
Blake Watters
f0e8e8d44f Coerce primary keys to strings in the thread-local lookup cache to handle lookups for numeric or string keys coming back in the JSON 2011-07-02 15:03:08 -04:00
Blake Watters
2a8ece97c1 Improvements to reachability, the request queue, logging throughout the network layer, decoupling of components via notifications, reliability improvements for unit tests in the cache layer. Improved thread-local cleanup routines inside the managed object store. Changing base URL's is now more reliable. fixes #171, #158, #113, #104, #102 2011-06-29 13:28:14 -04:00
Blake Watters
4773542a9e Fix breakage in Core Data 2011-06-23 09:21:54 -04:00
Duncan Lewis
ed9260abcd Issue #106 added requested change in RKManagedObjectStore.m 2011-06-16 18:47:42 -04:00
Duncan Lewis
61de21f0d1 Applied fix for RestKit issue #89 2011-06-16 18:29:21 -04:00
Blake Watters
9299cabc11 Implemented flexible logging solution utilizing the excellent LibComponentLogging library. 2011-06-11 20:25:28 -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
Blake Watters
e5093a38dd Merge pull request #83 from sixten/0.9-error-handling 2011-05-10 17:58:46 -07:00
Greg Combs
d780586da4 Deleting persistent store will now permit using a store seed. 2011-05-01 20:49:32 -05:00