Commit Graph

378 Commits

Author SHA1 Message Date
Blake Watters
47eed616ef Fix crash due to execution of RKDeleteInvalidNewManagedObject from outside of the dispatch queue of the NSManagedObjectContext that owns the object. fixes #1251 2013-02-21 23:02:23 -05:00
Victor Widell
2fa9b52dba The "teamMembers" variable was not used.
The variable "relationship" is not defined, and looks like it should be "teamMembers" instead.

This is a bit inconsequent with the example above, that is named "userRelationship". Either both or neither of them should include the word "relationship".
2013-02-15 18:27:28 +01:00
Victor Widell
429a5d36f1 The relationship variable was missing.
In the example, a variable named "relationship" is used, but not created. On the line above, another variable "userRelationship" is created but not used.

I'm assuming this is a typo, and they are supposed to be the same?
2013-02-15 18:18:10 +01:00
Victor Widell
888efff2e7 addAttributeMappings: doesn't exist.
I'm guessing it's a typo and the intended method is addAttributeMappingsFromArray:.
2013-02-15 14:12:15 +01:00
Blake Watters
88246423bb Fix invalid selector usage in managed object data source. fixes #1236 2013-02-14 22:55:12 -05:00
Blake Watters
4759a90cdc Add more cancellation backstopping to avoid NSObjectInaccessibleException crashes when executing RKManagedObjectRequestOperation instances that have been cancelled and the Core Data environment has shifted underneath them (i.e. records have been deleted from the store) 2013-02-05 14:07:46 -05:00
Blake Watters
00412cfebb Add rescue for NSObjectInaccessibleException within RKRelationshipConnectionOperation 2013-02-04 12:39:59 -05:00
Blake Watters
558c9bee83 Adjust implementation of async dispatching when managing cache entries so that there is only a single dispatch instead of N 2013-02-04 12:38:42 -05:00
Blake Watters
79150ad51e Guard against a potential "Could not fulfill a fault" crash during relationship connection if the object being connected has been deleted before the operation executes 2013-02-04 11:08:55 -05:00
Blake Watters
0bbb603b9e Switch to using an NSRecursiveLock instead of @synchronized within RKEntityByAttributeCache. Avoid a potential deadlock when handling a NSManagedObjectContextObjectsDidChangeNotification notification 2013-02-01 18:59:26 -05:00
Blake Watters
32c52f2d06 Enable metadata mapping for identification attributes. fixes #1202 2013-01-31 11:47:41 -05:00
Blake Watters
ec180fae5b Add a warning if you violate the save expectations of NSManagedObjectContext. fixes #1185 2013-01-29 11:51:41 -05:00
Blake Watters
4f442b142f Fix issue where NSManagedObject instances that are invalid due to missing require relationship when finished mapping, but are made valid by connected relationships are deleted prematurely. fixes #1179 2013-01-29 11:44:15 -05:00
Blake Watters
5d7669bcc1 Fix creation of duplicated managed objects when you map a nil source key path onto an indentification attribute. fixes #1194 2013-01-29 10:03:19 -05:00
Blake Watters
039c7c443d Fix issue where repeatedly mapping a to-many relationship without identification attributes would cause the first object in the relationship to be inappropriately reused 2013-01-26 12:10:55 -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
120584e320 Add missing copy support for the entity and deletion predicate. closes #1184 2013-01-23 12:54:41 -05:00
Blake Watters
2351fc2472 Add unit test and fix for crash during eviction of cache keys during query for compound identification attributes. closes #1171 2013-01-21 13:18:42 -05:00
Blake Watters
abd207420b Fix missing language in log message 2013-01-21 12:55:39 -05:00
Blake Watters
3d4c7b502d Copy attributeCaches to avoid potential for mutation during enumeration 2013-01-18 14:50:11 -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
Blake Watters
01c34fe289 Fix crash when mapping to NSManagedObject class with Transformable attribute without a backing property. fixes #1162 2013-01-17 10:38:53 -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
c98dd41c2f Reimplement predicate caching within the RKFetchRequestManagedObjectCache to avoid nasty crash due to malformed predicates. fixes #1141 2013-01-14 23:01:55 -05:00
Eric Chamberlain
51d36fb635 Fixed documentation omission
The managed object store provides two managed object contexts, not two managed objects.
2013-01-11 14:28:11 -05:00
Jeff Arena
e0481096cf Fix a few issues identified via static analysis 2013-01-11 11:57:55 -05:00
Blake Watters
91b12aee34 Add an exception if you try to create managed object contexts without adding a persistent store 2013-01-11 11:42:40 -05:00
Blake Watters
bce692d08f Guard against crash due to Nil value retrieved for managedObjectClassName in the property inspector 2013-01-09 09:47:51 -05:00
Blake Watters
4c0e62a62a Add new RKManagedObjectStore method for assisting in performing migrations when you have made dynamic modifications to the managed object model (such as when you leverage the Search indexing support) 2013-01-08 18:26:05 -05:00
Blake Watters
879ffd73e6 Add support for deleting Core Data managed objects that fail validation out of the mapping context. This enables you to silently drop mapping for managed objects that fail validation. fixes #691 closes #694 2013-01-01 23:56:58 -05:00
Blake Watters
28887d3384 Add support for deletion of mapped objects by predicate. closes #1109 2013-01-01 15:27:01 -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
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
7d63ca36ac Improve relationship connection behaviors when all connection attributes resolve to nil. Add logic for skipping the connection entirely. refs #1099 2012-12-26 10:53:16 -05:00
Blake Watters
4b2b7dbe4c Add support for skipping relationship connections if all connection attributes evaluate to nil. Add support for establishing connections when some connection attributes evaluate to nil. fixes #1099 closes #1102 2012-12-25 23:53:01 -05:00
Blake Watters
aecc1db352 Add support, tests, and documentation for the deletion of External Storage directory when an instance of RKManagedObjectStore is reset. closes #677 2012-12-25 14:50:13 -05:00
Blake Watters
285b75ea2a Eliminate connection matchers in favor of source and destination predicates. closes #1105 2012-12-24 18:29:00 -05:00
Blake Watters
78e55c90a2 Merge branch 'feature/1105-connection-matchers' of github.com:cfis/RestKit into cfis-feature/1105-connection-matchers 2012-12-24 17:58:24 -05:00
Charlie Savage
a67bb48ece Reimplement connection matchers and add test case. 2012-12-23 21:58:59 -07:00
Blake Watters
b78deb3eed Use instancetype in constructors for increased subclassing friendliness 2012-12-22 14:54:49 -05:00
Blake Watters
fccfd7724f Add truncation example code to the resetPersistentStores block 2012-12-20 18:59:14 -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
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
3fe377c03a Remove another pair of keyed subscript access instances 2012-12-10 17:18:00 -05:00
Blake Watters
5efcfe2c41 Eliminate remaining use of keyed subscript access 2012-12-10 17:12:53 -05:00
Blake Watters
abe67dcbb5 Eliminate use of keyed subscript access in RKEntityMapping inadvertantly introducing iOS 6.0 dependencies 2012-12-10 10:50:51 -05:00