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

Custom mappings on model #13

Open
davebcn87 opened this issue Jun 27, 2014 · 2 comments
Open

Custom mappings on model #13

davebcn87 opened this issue Jun 27, 2014 · 2 comments
Milestone

Comments

@davebcn87
Copy link
Member

For example, now it's complicated to import arrays when API attributes start in Uppercase string, because core data does not accept it. The way it works now you have to change every attribute user-defined variables in xcdatamodel.

Maybe a method in the model that returns a dictionary of the mapping should work:

- (NSDictionary *)LFSCoreDataMappingDictionary {
     return @{ "MyApiKey", "mycoredatakey" };
}
@davebcn87 davebcn87 added this to the 1.0.3 milestone Jun 27, 2014
@arol
Copy link
Member

arol commented Jun 27, 2014

This is an alternative way to do what mappingPath does, right?

@davebcn87
Copy link
Member Author

yes, maybe we should respect allowing keyPaths here:

- (NSDictionary *)LFSCoreDataMappingKeyPathDictionary {
     return @{ "User.name", "username" };
}

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