Commit Graph

60 Commits

Author SHA1 Message Date
Jeff Arena
37ae82c695 Add additional default date formatter to handle rails dates. 2012-10-24 13:23:54 -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
316d2c1316 Improve assertion error message 2012-10-18 17:19:48 -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
61a0a05b29 Drop ISO8601DateFormatter dependency since it has a time zone handling bug and switch to RK specific fork. fixes #971
* ARCify the ISO8601DateFormatter
2012-10-04 23:00:01 -04:00
Dmitry Shevchenko
a41f69ee5e Fixed RKObjectMapping copying 2012-10-01 16:47:17 -05:00
Blake Watters
ecb6af4776 Factor date formatting into reusable convenience functions 2012-09-28 14:59:57 -04:00
Blake Watters
e56754cb65 Add support for mapping of numeric dates encoded in strings via NSNumberFormatter. closes #815 2012-09-25 21:18:03 -04:00
Blake Watters
c9249bf0dc Cleanup accidentally committed empty method 2012-09-24 22:45:55 -04:00
Blake Watters
235f5fc579 Fix all build errors in unit tests. Restore execution of core mapping tests. 2012-09-24 22:44:20 -04:00
Blake Watters
b0be4596da Formatting cleanups 2012-09-24 13:37:54 -04:00
Blake Watters
52d772f2e0 Misc stylistic touch ups 2012-09-18 15:54:36 -04:00
Stephan Diederich
6e4b1a1600 fix performance of MappingOperation (#902)
This commit replaces the special handling of unix-timestamps
into the existing dateformatter architecture.
By adding it to the end of the list, it's still present, but doesn't
'cost' anything for all other users.
2012-09-14 16:19:51 +02:00
Stephan Diederich
1ad0cd380a remove premature optimization
there are currently 3 (not 2) formatters
2012-09-14 16:16:09 +02:00
Blake Watters
b1a2677937 Eliminate NSData and NSArray additions categories. Kill date formatter wrapper class 2012-09-04 21:43:37 -04:00
Jawwad Ahmad
c70ab49457 Delete @synthesize statements that are no longer needed. (Works with current 4.4.1 release of Xcode). 2012-09-02 12:28:45 -04:00
Blake Watters
2cf16be6cb Add support for performing object mapping with type transformations across relationships defined with keyPaths 2012-08-31 17:47:44 -04:00
Jawwad Ahmad
6f2db23566 Add NSAssert to check the self.mutablePropertyMappings variable. 2012-08-30 18:56:33 -04:00
Blake Watters
eabfd748b6 Update designated initializer for RKObjectMapping 2012-08-29 18:59:51 -04:00
Blake Watters
ce6b0829e4 Convert RestKit to ARC 2012-08-28 17:34:58 -04:00
Blake Watters
2228cb01bb Drop more mapping convenience methods 2012-08-28 14:23:30 -04:00
Blake Watters
b333e62488 Eliminate and/or depecate numerous mapping API's in favor of simpler usage of attribute, relationship, and connection mappings 2012-08-28 14:14:33 -04:00
Blake Watters
d0df342093 Eliminate modern Objective-C dictionary access in favor of method call 2012-08-22 20:08:01 -04:00
Blake Watters
0ff963161f Add addAttributeMappingsFromDictionary: 2012-08-14 09:57:28 -04:00
Blake Watters
a8f64e7982 Continued cleanup related to managed object context work 2012-07-17 13:44:50 -04:00
Blake Watters
b25a1833b3 Ported RestKit to using managed object contexts with concurrency types. Numerous cleanups and API updates. 2012-07-16 22:47:06 -04:00
Blake Watters
f18f9337f3 Added support for comparison of attribute, relationship, and object mappings via isEqualToMapping:. closes #803 2012-07-11 16:16:27 -04:00
Jawwad Ahmad
abb46c382c Ensure the stars for all pointers belong to the variable rather than the type. Refs #614 2012-06-04 22:47:30 -04:00
Jawwad Ahmad
eaa5484b01 Placing opening braces on a new line for methods to match Apple convention. Refs #614
Used uncrustify's "nl_fdef_brace = add" option to detect issues.
2012-06-04 00:36:19 -04:00
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
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
887b4a4743 Added support for configuring objectClass using the class name instead of Class object. 2012-04-03 23:39:43 -04:00
Brian Morton
80103bb6b3 Change test for allowing newly added date formatters priority so that it uses the updated fixture and reversable favoriteDate. Rearrange order of defaultDateFormatters to match their order before changing defaultDateFormatters to being prepended. 2012-03-13 09:43:37 -07:00
Scott Penrose
5b8f1c34d6 Always add default date formatters to start of array to be tried first. RKISO8601DateFormatter will match a lot of different dates and most likely your default date formatter was not getting hit since it was last in the list. 2012-03-01 22:51:13 -05:00
Blake Watters
4d48ef4729 Fixed breakage in OS X support 2012-02-15 17:48:59 -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
Christopher Swasey
886ec75283 Import http://boredzo.org/iso8601parser/ and add it as a defaultDateFormatter for parsing ISO8601 strings. Fixes #438 2012-01-20 15:13:45 -05:00
Blake Watters
6abbb34ef0 Introduced mapping contexts support.
Extended RKObjectMappingProvider to store collections of object mappings for different use cases. The framework
now stores object mappings, serialization mappings, an error mapping and a pagination mapping using the context
support. Contexts can be added to the provider via method calls or extension via a category.
2012-01-20 10:21:19 -05:00
Blake Watters
563f5e909b Updated all example projects to build against the new project. Cleaned up header imports for flattened project structure 2011-12-02 09:26:36 -05:00
Aaron Crespo
6b8ab373ac Update Code/ObjectMapping/RKObjectMapping.m 2011-11-03 16:26:50 -03:00
Blake Watters
586034bae4 Add support for the use of nesting key attributes as the primaryKey in managed mappings.
This bug was causing duplication of objects in the store due to failed lookup of
existing objects. Added fix and test coverage for the use-case.
2011-10-05 10:50:52 -04:00
Blake Watters
91a6e9423e Added convenience methods and docs for mapping NSSet and NSArray attribute collections. fixes #285 2011-09-19 21:03:02 -04:00
Greg Combs
62d7042ebc Merge pull request #334 from parkerboundy/add-apache-license
Add the Apache License to headers (Issue #145) Closes #145.  Thanks @parkerboundy.
2011-09-14 21:56:15 -07:00
Blake Watters
12bacf9be4 Removed references to sharedQueue from Advanced Tutorial sources 2011-09-08 09:38:26 -04:00
Parker
99250475ad added Apache License headers to all files in ObjectMapping directory 2011-09-07 11:31:01 -04:00
Blake Watters
2ccc44954a Configured default locale to en_US_POSIX for default date formatters. closes #273 2011-09-05 17:54:07 -04:00
Blake Watters
54007c78d4 Reworked Brendan Ribera's contributions around time zone handling to eliminate the use of transient
NSDateFormatters, added a preferredDateFormatter for use when serializing dates to strings,
replaced the use of the description method for date encoding to strings with invocation of the
preferredDateFormatter, added new attribute transformation strategy from NSDate -> NSString properties
(also using the preferred date formatter), and provided customization support for date handling globally
and on a per-mapping basis. closes #200, closes #313, closes #309, closes #308
2011-09-05 17:25:43 -04:00
Blake Watters
2e430644d9 Added support for using NSEntityDescription to lookup property types for NSManagedObject attribute and relationships. This enables mapping type transformations on mappings defined against Core Data entities instead of concrete subclasses. fixes #233 2011-08-14 23:21:51 -04:00
Blake Watters
4e03ba7bef Renamed Polymorphic mapping to dynamic mapping after consulting with the community. Dropped abstract superclass in favor of a RKObjectMappingDefinition protocol. Caught missing cases with dynamic object mapping + targetObject. Updated docs and method signatures to reflect the updates. 2011-07-31 19:37:42 -04:00