Implementation of Object Mapping 2.0 design:

* Removed RestKit from inheritance hierarchy
  * Mappings are implemented as concrete classes
  * Mapper is much more flexible & powerful
  * Much more robust error handling
  * Serialization is reimplemented as an object mapping operation
  * Added ability to serialize to JSON natively
  * Reworked Core Data integration
  * Simplified the codebase substantially
This commit is contained in:
Blake Watters
2011-04-23 18:32:33 -04:00
parent 3a76780f76
commit f3c0995d5e
244 changed files with 13499 additions and 3073 deletions

View File

@@ -10,6 +10,7 @@
#import <Three20/Three20+Additions.h>
#import "DBUser.h"
#import "DBTopic.h"
#import "DBPost.h"
@implementation DBPostTableViewController
@@ -17,7 +18,7 @@
- (id)initWithPostID:(NSString*)postID {
if (self = [super initWithStyle:UITableViewStyleGrouped]) {
_post = [[DBPost objectWithPrimaryKeyValue:postID] retain];
_post = [[DBPost findFirstByAttribute:@"postID" withValue:postID] retain];
}
return self;
@@ -25,7 +26,7 @@
- (id)initWithTopicID:(NSString*)topicID {
if (self = [super initWithStyle:UITableViewStyleGrouped]) {
DBTopic* topic = [[DBTopic objectWithPrimaryKeyValue:topicID] retain];
DBTopic* topic = [[DBTopic findFirstByAttribute:@"topicID" withValue:topicID] retain];
_post = [[DBPost object] retain];
_post.topicID = topic.topicID;
_post.topic = topic;