Created
March 1, 2012 05:55
-
-
Save EverythingSolution/1947672 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)copyAttributesFromObject:(NSManagedObject *)oldObject toObject:(NSManagedObject *)newObject | |
{ | |
NSArray *attributeKeys = [[[oldObject entity] attributesByName] allKeys]; | |
NSDictionary *attributes = [oldObject dictionaryWithValuesForKeys:attributeKeys]; | |
[newObject setValuesForKeysWithDictionary:attributes]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment