Blake Watters
bc719087ac
Intelligently set the targetObject by exploring the mapping graph in appropriateObjectRequestOperationWithObject: to better support cases in which you POST/PUT one object, but map back another. fixes #1081
2012-12-23 00:26:33 -05:00
Blake Watters
0a033596da
Relax the use of use an the informal procotol for the errorMessage property in favor of the description method. closes #1104 , closes #1087 , closes #1095
...
* Change contract to the use the `description` method instead of `errorMessage`. This makes it work with any class out of the box
* Add import for RKErrorMessage to the Support.h header so it is immediately available
* Fix incorrect keyPath in the README.md
* Add additional notes about how the errors are constructed to the README
2012-12-22 19:03:30 -05:00
Blake Watters
7984d4f2ac
Reimplement inverseMapping so that it no longer sucks. fixes #864 , #1058
...
* Inversing non intelligently walks the mapping graph, ensuring that cyclic graphs are resolved properly
* Copy all attributes from the parent to the inverse mapping (date formatters, etc)
2012-12-22 16:36:55 -05:00
Blake Watters
b78deb3eed
Use instancetype in constructors for increased subclassing friendliness
2012-12-22 14:54:49 -05:00
Jeff Arena
dc16dc7e8f
Change to future date test spec
2012-12-21 11:03:45 -05:00
Blake Watters
0cc9ce671e
Improve the error messages for failure to match any key paths in the mapper
2012-12-20 22:16:42 -05:00
Blake Watters
ef038aed73
Add a unit test for concurrent mapping of managed object request operations targetting the same unique Core Data objects. closes #1079
2012-12-19 23:02:52 -05:00
Blake Watters
408072f733
Add support and tests for inferring entity identifiers from superentity user info. closes #954
2012-12-19 22:21:09 -05:00
Blake Watters
0a28ecb507
Add optional support for connecting to subentities. fixes #1059
2012-12-19 18:32:32 -05:00
Jeff Arena
5258328a39
Future date test
2012-12-19 18:30:24 -05:00
Jeff Arena
43cab3dc6c
Add test case for mapping a future date string
2012-12-19 17:06:01 -05:00
Blake Watters
862e84a515
Hook the RKManagedObjectMappingOperationDataSource into the Managed Object Context save lifecycle to avoid the creation of duplicate objects during sequential mapping operations
2012-12-18 22:00:44 -05:00
Blake Watters
9f228e0280
Expand test coverage on managed object deletion cases and fix bugs. closes #358
2012-12-16 20:45:01 -05:00
Blake Watters
a424908242
Expand test coverage and fix all known issues with managed object refetching and deletion. closes #1066
2012-12-13 22:42:34 -05:00
Blake Watters
a471bdd8a3
Add support for refetching NSManagedObject instances mapped at any point in the object graph. refs #1066
2012-12-12 20:47:14 -05:00
Blake Watters
69c65ef8ab
Override error implementation to correct the NSLocalizedDescription key for RKHTTPRequestOperation objects. fixes #1070
2012-12-11 23:12:20 -05:00
Blake Watters
138bbddfcd
Switch the default date formatter to ISO-8601. closes #1069 , refs #1010
2012-12-11 21:51:53 -05:00
Blake Watters
ae6b58d7bc
Add support for parameterizing NSSet. refs #1010
2012-12-11 21:31:40 -05:00
Blake Watters
b9457ce65c
Remove RKObjectManager specific value for the 'Accept' header and configure the header directly on the HTTP client instead. Register the AFJSONRequestOperation class in managerWithBaseURL:. Update documentation.
2012-12-11 21:24:22 -05:00
Blake Watters
f51a711a15
Add test coverage and bug fix for mapping error while processing an error response with RKObjectResponseMapperOperation. closes #1064
2012-12-11 09:00:57 -05:00
Blake Watters
7b4098ca6f
Add test coverage for ensuring creation of RKManagedObjectRequestOperation from appropriateObjectRequestOperationWithObject:method:path:parameters: with no matching response descriptors
2012-12-10 09:43:32 -05:00
Blake Watters
1c86cfab75
Improve RKManagedObjectRequestOperation handling for DELETE requests and expand test coverage
...
* Failure to match a response descriptor no longer fails DELETE requests
2012-12-09 23:24:45 -05:00
Blake Watters
61102be1a4
Fix incorrect mapping results for secondary key paths when more than one response descriptor matches and there is a targetObject. fixes #1057
2012-12-07 18:56:14 -05:00
Blake Watters
5685a5fb60
Add test case investigating #921
2012-12-07 18:25:47 -05:00
Blake Watters
d79dec118a
Greatly improve error output when all response descriptors fail to match. closes #1060
2012-12-07 17:39:02 -05:00
Blake Watters
f4457f2948
Add MOC reset to the beginning of resetPersistentStores:. closes #1018
2012-12-07 15:06:13 -05:00
Blake Watters
0eb875679d
Add proxy attributes enabling pagination mapping configuration under iOS 5. Expand documentation. closes #1040
2012-12-07 14:16:50 -05:00
Blake Watters
b1f57612e1
Add support for replacing the HTTP client on the object manager and mutating the baseURL on the router. closes #1051
2012-12-07 13:49:18 -05:00
Blake Watters
997158e9e6
Fix issues with incorrect determination of the appropriate object request operation. fixes #1054 , #1056
...
* Expands test coverage for the `appropriateObjectRequestOperationWithObject:method:path:parameters:`
* Uses an object graph visitor to completely navigate the mapping graph, ensuring that an `RKEntityMapping` appearing at any nesting level will be correctly handled
2012-12-07 12:40:02 -05:00
Blake Watters
79e31b524a
Refactored managed object caches and connection support to enable connecting by multiple atributes that are specified as arrays.
...
* Migrated the caches to return `NSSet` to eliminate duplicate objects when your cache keys overlap
* Introduced new recursive strategy for building cache keys in `RKInMemoryManagedObjectCache`
* Added support for array cache key values in `RKFetchRequestManagedObjectCache`
* Re-enabled a slew of tests that were disabled during 0.20 development
2012-12-06 23:43:34 -05:00
Blake Watters
a5dc037ef9
Add support for inferring attributes that match the snake-case _id pattern. closes #1047
2012-12-02 14:34:03 -05:00
Blake Watters
cbb3f70571
Eliminate the RKEntityIdentifier class and migrate the functionality into properties on RKEntityMapping
2012-12-02 13:08:52 -05:00
Blake Watters
b502f5431b
Drop the entity description category entirely
2012-11-28 22:52:39 -05:00
Blake Watters
1196a42e54
Docs for RKConnectionDescription
2012-11-27 22:18:29 -05:00
Blake Watters
8dc54a89b2
Major overhaul to the Core Data managed object identification and relationship connection support.
...
* Replaces primary key with `RKEntityIdentifier`
* Add support for use of compound keys for object identification
* Refactor `RKConnectionMapping` to `RKConnectionDescription` and add support for connecting with multiple attributes
* Clarify naming of representation key methods to better match naming conventions
* Add type transformation support for object identification
* Greatly expand test coverage for object identification
* Drop the `NSEntityDescription` category
* Simplify the `RKManagedObjectCaching` protocol
* Add compound key support to the Fetch Request and In Memory Cache implementations
* Replace Kiwi with Specta for tests where contexts are helpful for organization
* Rename `defaultValueForMissingAttribute` to `defaultValueForAttribute`
2012-11-27 10:29:36 -05:00
Blake Watters
f3a853e871
Drop RK prefix from entity names
2012-11-23 22:19:12 -05:00
Blake Watters
7888a55f6c
Remove the ignoreUnknownKeyPaths option. closes #840
2012-11-19 19:21:24 -05:00
Blake Watters
36c60608b2
Add support for transforming source to destination key paths using a block. This enables one to DRY up mapping configuration.
2012-11-19 18:53:13 -05:00
Blake Watters
54dce20ac6
Rework paginator support for 0.20. closes #1024 , #900 , #759
...
* Renamed RKObjectPaginator to RKPaginator for simplicity
* Removed delegate on paginator in favor of simple success/failure blocks
* Added `willMapDeserializedResponseBlock` for manipulating the response body before mapping begins
* Added support for cancelling an in-progress pagination request
2012-11-18 22:44:33 -05:00
Blake Watters
6837d0d1b9
Add support for hooking into the RKSearchIndexer via a delegate
...
* Supports replacing the RKSearchWord fetch strategy to enable caching for performance
* Supports declining creation of search words
* Supports declining of indexing for specific objects
* Supports notification when objects are indexed and search words are added to the index
2012-11-12 16:18:36 -05:00
Blake Watters
2aeb07d47a
Make test less brittle
2012-11-09 12:11:58 -05:00
Blake Watters
e109036683
Add support and test coverage for serializing Boolean properties to JSON as true/false instead of numbers. closes #920 , #827
2012-11-08 23:41:19 -05:00
Blake Watters
3db5307f6a
Add missing test coverage for key path based connection scenarios. Fixes crashes resulting from double collection wrapping during connection.
2012-11-08 19:31:38 -05:00
Jeff Arena
c7ae6c389e
Fix a few broken specs.
2012-11-08 13:47:26 -05:00
Blake Watters
0fe296a281
Bump AFNetworking dependency
2012-11-07 22:01:34 -05:00
Blake Watters
f2ff70177c
Merge branch 'development' of github.com:CFKevinRef/RestKit into CFKevinRef-development
2012-11-07 21:59:38 -05:00
Blake Watters
d689ba9291
Add support for mapping to NSData attributes using a NSKeyedArchiver. closes #910
2012-11-07 11:00:15 -05:00
Blake Watters
aa9f2a21e3
Port remaining test cases from NSData serialization pull request. closes #762
2012-11-06 12:14:40 -05:00
Blake Watters
e85cf659c0
Improve Request Descriptor registration and lookup behaviors:
...
* Add assertion to object manager when you attempt to register an overlapping request descriptor
* Improve search algorithm to handle subclass matches
2012-11-05 23:10:57 -05:00
Blake Watters
28c8262b0d
Port commented out unit tests from 0.10.x to latest development sources to nail down issues with targetObject behaviors
2012-11-05 18:38:24 -05:00