Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Mapping dictionary keys to entity properties #27

Open
dodikk opened this issue Apr 23, 2015 · 2 comments
Open

[feature] Mapping dictionary keys to entity properties #27

dodikk opened this issue Apr 23, 2015 · 2 comments
Assignees

Comments

@dodikk
Copy link

dodikk commented Apr 23, 2015

Having a server response (chunk)

"thumbnails":
{
     "120x79” : ”<url>”, 
    “800x600” : "<another URL>" 
}

I'd like to get two entities of "thumbnail" type having both dictionary key and its value stored in its properties.

@interface Thumbnail : NSManagedObject

@property (nonatomic, retain) NSString * imageDimensions; //  @"120x79”
@property (nonatomic, retain) NSString * url; // "<url>”

@end
@dodikk
Copy link
Author

dodikk commented Apr 23, 2015

The home repo (EasyMapping/EasyMapping) seems to have the API to solve this problem.
https://github.com/EasyMapping/EasyMapping/blob/master/EasyMapping/EKObjectMapping.h#L167

Please merge it to your fork.

@dimazen
Copy link
Contributor

dimazen commented Apr 29, 2015

@dodikk I'll take a look on this weekends, thanks!

@dimazen dimazen self-assigned this Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants