Closed thepatrick closed 11 years ago
I have code, much like:
Properties: _id, _rev, site (all NSString), jsonRepresentation (NSData)
SomeRecord *sr = [SomeRecord newRecord]; sr._id = @"something"; sr.site = @"mine"; [api doStuff:^(NSDictionary*)r { NSError *err; sr.jsonRepresentation = [NSJSONSerialization dataWithJSONObject:r options:kNilOptions error:&err]; sr._rev = r[@"_rev"]; [sr save]; }];
But while I can log, just before [sr save] the values of sr._id and sr.jsonRepresentation and they are all correct, logging the object itself shows that its idea of reality is clearly inconsistent:
_id => (null);_rev => 3-d502435ac80cc2b3fd78facdc2399e51;site => (null);jsonRepresentation => (null);id => (null);updatedAt => (null);createdAt => (null);
Which tag/branch you use?
I have code, much like:
Properties: _id, _rev, site (all NSString), jsonRepresentation (NSData)
But while I can log, just before [sr save] the values of sr._id and sr.jsonRepresentation and they are all correct, logging the object itself shows that its idea of reality is clearly inconsistent: