Blake Watters
9005bd573c
Add test coverage and fixes for RKMappingTest. closes #1086
2013-01-03 18:19:50 -05:00
Blake Watters
9dc08ca27b
Drop instancetype from init methods since the compiler will infer it
2013-01-01 15:27:01 -05:00
Blake Watters
a03191c291
Add support for skipping an aggregate relationship mapping in the event that the parent representation does not contain any values for the property mappings of the concrete RKObjectMapping configured for the relationship. fixes #1114 , closes #1115
2012-12-31 17:33:41 -05:00
Blake Watters
b23ea410a8
Add support and test for inversing a mapping containing attributes mapped with nil destination key paths. fixes #1116
2012-12-29 22:13:12 -05:00
Blake Watters
5c21e52829
Update Dynamic Mapping API's to match the rest of the 0.20.x style. Introduce support for predicate based dynamic matching.
...
* Rename RKDynamicMappingMatcher to RKObjectMappingMatcher since it is not strictly coupled to dynamic mapping and works with object mappings.
* Rework matchers into using a class cluster style to enable flexible subclassing to introduce additional matchers.
2012-12-27 22:16:40 -05:00
Blake Watters
92458a1e88
Enable support for mapping a relationship flexibly via assignment policies. You can now map a relationship and assign its value by setting, replacing, or unioning (combining) the relationship. closes #1073 , closes #989
2012-12-26 17:56:39 -05:00
Blake Watters
b858f2753f
Grow up support for mapping to primitives by avoiding crashes due to null conversions. fixes #1043 , fixes #741 , fixes #703
2012-12-26 14:40:59 -05:00
Blake Watters
d1568cad63
Add support for mapping singular values to collections. fixes #1046
2012-12-26 00:20:56 -05:00
Blake Watters
b3899ac191
Add support for mapping a relationship directly from the parent object representation, rather than at a nested key path. closes #859
...
* Update documentation in RKRelationshipMapping.h
2012-12-24 16:18:39 -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
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
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
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
abd07043f3
Output a string representation of the HTTP status code in the HTTP operation log. Add RKStringFromStatusCode convenience method to the HTTP utilities
2012-12-13 17:52:51 -05:00
Blake Watters
1289e769ac
Add some organization to the RKMappingOperationDelegate headers
2012-12-13 16:03:45 -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
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
c9e222fdc6
Fix documentation error in RKDynamicMapping header
2012-12-01 16:34:14 -05:00
Blake Watters
648b159f9a
Remove dead code
2012-11-29 23:35:37 -05:00
Blake Watters
adf4a5d49e
Drop RKConnectionMapping, cleanup. Add predicate support
2012-11-27 22:34:55 -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
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
7d9087b722
Supress extraneous logging when type is transformed to nil
2012-11-09 12:12:42 -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
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
45c6e1611e
Add delegate for didFailToConnectRelationship:
2012-11-05 18:38:23 -05:00
Kevin Cassidy
f049f5f998
Take KVC scalar/structure support and NSAttributeType into account when inspecting properties.
2012-11-05 11:55:12 -05:00
Blake Watters
454eb2e8fa
Correct usage of 'method' instead of 'function' in comment
2012-10-28 19:40:22 -04:00
Jeff Arena
37ae82c695
Add additional default date formatter to handle rails dates.
2012-10-24 13:23:54 -04:00
Blake Watters
f96fee87b6
Add a decent description method to the object request operations
2012-10-22 19:29:58 -04:00
Blake Watters
a267f5ac71
Drop extraneous space between class and object address in property description
2012-10-21 16:16:04 -04:00
Blake Watters
117fcbb18c
Fix horrible bugs in previous commit
2012-10-21 15:58:03 -04:00
Blake Watters
f93a044561
Add error condition when attempting to map an RKEntityMapping containing connection mappings with a nil managed object cache.
...
* Add support for the data source to fail mapping operation with an error.
* Clean up error handling within RKMappingOperation
2012-10-21 15:47:16 -04:00
Blake Watters
ef46ff2d1d
Add assertion that gives the developer a hint of how to fix an attempt to add an array of attribute mappings that already exist in another mapping
2012-10-20 17:43:49 -04:00
Blake Watters
63c9a9e4a0
Fix bug in which relationship connection operations are not enqueued for RKMappingOperation instances whose mapping is an RKDynamicMapping
2012-10-20 16:53:14 -04:00
Blake Watters
08110ca300
Implement support for cancellation and prioritization of response mapping operations using an operation queue global to all object request operations.
...
* Passes through cancellation from object request operation to HTTP request operation and response mapping operation. closes #993
* Performs all object mapping within an NSOperationQueue to enable constraining of mapping activities.
* Add default mapping queue with concurrency limit of 1 operation.
* Migrate deserialization of the response body into a serial dispatch queue to ensure that only one parse occurs at a time.
2012-10-20 00:13:48 -04:00
Blake Watters
639897dd67
Refactored relationship mapping implementation to make it easier to follow and debug
2012-10-19 17:53:09 -04:00
Blake Watters
316d2c1316
Improve assertion error message
2012-10-18 17:19:48 -04:00
Blake Watters
e748e5bfce
Don't throw an exception if doing a simple attribute mapping with a nil data source. closes #1005
2012-10-18 15:17:57 -04:00
Blake Watters
5684f7ab89
Add objectMapping identity attribute on RKPropertyMapping to allow one to traverse the mapping graph from an attribute/relationship back to the parent mapping
2012-10-18 14:37:52 -04:00
Blake Watters
e8b4cdd19c
DRY up find or create of destination object within the mapping operation and change nil destination object to an error condition instead of an assertion.
2012-10-18 14:06:46 -04:00
Blake Watters
fb6db948e1
Implement support for using dynamic mapping during parameterization with a Request Descriptor. closes #684
2012-10-18 12:14:16 -04:00
Blake Watters
20c4121644
Improve logging when mapping a null relationship value. refs #862
2012-10-16 20:50:35 -04:00
Blake Watters
9d617c6c7b
Add support for disconnecting relationships when mapping a related keypath whose value is equal to [NSNull null]. fixes #862
2012-10-16 20:48:27 -04:00