Blake Watters
90fe39e8e9
Fix issue with RKPathAndQueryStringFromURLRelativeToURL function dropping trailing slashes due to reliance on [NSURL path]. fixes #1220
2013-03-12 18:57:13 -04:00
Blake Watters
de5aed6bde
Fix incorrect type transformation when the destination class is a mutable class. fixes #1201
2013-03-09 23:03:06 -05:00
Blake Watters
5329ef450e
Fix function declaration for RKCacheableStatusCodes
2013-03-07 21:17:51 -05:00
Blake Watters
e805bbc41e
Improve documentation regarding registration of transformation blocks. closes #1270
2013-03-07 21:00:45 -05:00
Charlie Savage
535255a686
Fix RKReplaceAssignmentPolicy. The problem was that new values for the relationship were gathered before the old values were deleted. Therefore if one of the new values was the same as the old value, the valueForRelationship collection would contain a deleted managed - not good.
...
Also fixed:
* The if statement near line 674 was incorrectly negated
* Setting the relationship value around line 676 was redundant since it was done in the mapCoreDataToManyRelationshipValue:withMapping method.
2013-03-07 20:55:42 -05:00
Blake Watters
a9ef1fe39d
Introduce a new heuristic based approach for determining if a response can skip the mapping process. Also introduces a new Network + CoreData logging component and reduces the chattiness of the debug logging level for Core Data Network events.
2013-03-07 19:25:14 -05:00
Christian Himmelsbach
4c1d010e91
fix: To one relationships, that have a nested destination keypath are not correctly mapped to JSON
2013-03-07 14:55:07 -05:00
Blake Watters
8958bc8415
Improve cancellation behaviors for in-progress RKManagedObjectRequestOperation instances
2013-02-01 19:00:04 -05:00
Blake Watters
197a54bf60
Rework metadata mapping to fix breakage under OS X
2013-02-01 11:26:08 -05:00
Blake Watters
32c52f2d06
Enable metadata mapping for identification attributes. fixes #1202
2013-01-31 11:47:41 -05:00
Jeff Arena
2f78250891
Change log level for a specific mapping operation failure case
2013-01-28 17:49:34 -05:00
Blake Watters
4840b4b63e
Fix crash when attempting to union a relationship with a nil value. fixes #1195
2013-01-28 17:22:33 -05:00
Blake Watters
d761de0ea7
Fix crash when attempting to map nil sourceKeyPath as identification attribute
2013-01-26 00:21:44 -05:00
Blake Watters
0364d6c67b
Integrate support for metadata mapping routing data. refs #1174
2013-01-24 23:16:48 -05:00
Blake Watters
4c39918fdb
Implement support for flexible metdata mapping. closes #582 , #688
...
* Metadata mapping is implemented via an `NSProxy` object that stands in for the `sourceObject` of each `RKMappingOperation`
* Key paths that are prefixed with `@metadata.` are mapped against the `metadata` dictionary of the operation, else they hit the `sourceObject`.
* Metadata is implemented by merging a dictionary of data in from `RKObjectRequestOperation`, through to `RKResponseMapperOperation`, into `RKMapperOperation`, and all the way down into the `RKMappingOperation`, where it is available to each object. By convention, metdata is namespaced into subdictionaries.
2013-01-24 16:31:19 -05:00
James Moschou
7ba7070d89
Fix RKObjectIsCollectionContainingOnlyManagedObjects function
2013-01-24 16:57:46 +10:30
Blake Watters
966e006990
Fix bug with refetching due to failure to track applied attribute mapping when mapped value is unchanged. closes #1176
2013-01-21 15:03:53 -05:00
Blake Watters
06f2fe9c7b
Radically simplify the implementation of managed object deletion and refetching within RKManagedObjectRequestOperation. closes #1163
...
1. Eliminates use of visitor in favor of aggregating mapping info during mapping. This avoids having to traverse the mapping graph.
1. Eliminate special case handling of cyclic key paths.
1. Eliminate issues with infinite recursion while traversing the mapping graph.
2013-01-18 12:20:51 -05:00
Blake Watters
a65a50e8f7
Fix bug with mapping nested attribute values with identification attributes when the identification attribute is not the nesting key. fixes #1129
2013-01-17 11:34:40 -05:00
James Moschou
02952aa2bb
Add support for transforming strings 'Y' and 'N' to boolean NSNumber objects
2013-01-16 19:26:04 -05:00
Blake Watters
868d83be2c
Don't create unnecessary objects when mapping temporary managed objects POST'd without identification attributes. closes #1149
2013-01-15 22:45:43 -05:00
Blake Watters
259e6c2fe5
Fix all test breakage in OS X Framework tests
2013-01-15 09:07:44 -05:00
Blake Watters
139decbc36
Remove accidentally committed debug logging
2013-01-09 22:29:26 -05:00
Blake Watters
b61039c838
Use a visitor to identify all NSManagedObject instances being sent via the object manager which have a temporary managed object ID to avoid crashes during mapping. refs #1001
2013-01-09 21:11:38 -05:00
Blake Watters
7f8320c514
Add helpful error message if you call requestMapping on an RKObjectMapping subclass
2013-01-06 01:11:09 -05:00
Blake Watters
422768f6b1
Add support for dynamic nesting key serialization. closes #684
2013-01-03 23:02:49 -05:00
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