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

Adding new options to record population steps #41

Closed
wants to merge 5 commits into from

Conversation

cnstoll
Copy link
Contributor

@cnstoll cnstoll commented Feb 23, 2014

Some speculative work on adding a few new customization options to the record population workflow for supporting:

  • Injecting a primary key where the API does not include one, but you have access to it externally
  • Custom population steps where injecting new data into the flow is required, such as if the API doesn't include certain data that you have external access to

Feedback is very welcome

@cnstoll cnstoll added this to the 1.2.1 milestone Feb 23, 2014
@param dictionary The dictionary being used to populate the given record.
@return id The primary key to associate with the record.
*/
typedef id (^MMRecordOptionsEntityPrimaryKeyInjectionBlock)(NSEntityDescription *entity,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any restrictions on what this primary keyed object should be? I'm betting it should at least be NSCopying compliant, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah thats definitely true. Do you think thats worth adding? That would also make it more clear that this is NOT for use with record to parent record primary keys, since NSManagedObjects don't support NSCopying.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always prefer compile-time errors and warnings over exceptions and assertions.

@cnstoll
Copy link
Contributor Author

cnstoll commented Mar 1, 2014

Merged into the 1.3.0 branch.

@cnstoll cnstoll closed this Mar 1, 2014
@cnstoll cnstoll deleted the cnstoll_populationOptions branch March 1, 2014 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants