Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


typo in attributesForRepresentation #135

merged 1 commit into from

3 participants


The purpose of attributesForRepresentation is to delete keys and values of representation except attributes of entity. So the mutableKeys should minusSet [entity attributesByName] instead of [entity propertiesByName]. The propertiesByName includes relationship of entity.


The code right after (between lines 214 and 217) already removes all representation relationships, except for [NSNull null] relationships (correct my thinking, if I'm wrong here, please!). Your change would strengthen this method by making sure no pesky NSNull relation gets returned in the resulting dictionary. Thumbs up from me for this commit :thumbsup:

@mattt mattt merged commit 06f116b into from

Dang, that typo again? I swear, I've probably gotten that wrong more than I got it right. Thanks for the pull request.

@alvinhu alvinhu deleted the branch
@alvinhu alvinhu restored the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2012
  1. @alvinhu
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  AFIncrementalStore/AFRESTClient.m
2  AFIncrementalStore/AFRESTClient.m
@@ -207,7 +207,7 @@ - (NSDictionary *)attributesForRepresentation:(NSDictionary *)representation
NSMutableDictionary *mutableAttributes = [representation mutableCopy];
@autoreleasepool {
NSMutableSet *mutableKeys = [NSMutableSet setWithArray:[representation allKeys]];
- [mutableKeys minusSet:[NSSet setWithArray:[[entity propertiesByName] allKeys]]];
+ [mutableKeys minusSet:[NSSet setWithArray:[[entity attributesByName] allKeys]]];
[mutableAttributes removeObjectsForKeys:[mutableKeys allObjects]];
Something went wrong with that request. Please try again.