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

Ability to modify objects after being imported using Groot #95

Closed
wants to merge 1 commit into from

Conversation

ManueGE
Copy link

@ManueGE ManueGE commented Dec 20, 2018

The changes contained on this PR add the ability to modify an object after being inserted/update using Groot in a consistent way.

It just adds a category to NSManagedObject with the method grt_awakeFromInsert that is called after each insert/update operation. This method can be overridden by any subclass.

This is a possible solution for the issue described in #93 .

If you like the idea but you want me to change something let me know.

@ManueGE ManueGE changed the title Add grt_awakeFromInsert methods Ability to modify objects after being imported using Groot Dec 20, 2018
@gonzalezreal
Copy link
Owner

Hi @ManueGE,

Thanks for your contribution. It seems a useful feature to have. My concern with the implementation is the use of an extension, rather than a protocol. Is there any special reason you chose to do it that way?

@ManueGE
Copy link
Author

ManueGE commented Dec 23, 2018

No, there is not a reason for that. I also thought about adding it as a protocol, but I finally decided to do it as an extension. I can switch it to a protocol if it sounds better for you.

Any idea about the name of that protocol? Maybe GrootCustomInsertable and a method called postInsert?

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