Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Support generic value transformation in mappings #66

Closed
wants to merge 4 commits into from
Closed

Support generic value transformation in mappings #66

wants to merge 4 commits into from

Conversation

kattrali
Copy link
Contributor

Changes

  • Adds support for a transform key in mappings. It is expected to a block which will take the value and transform it as needed before being persisted.

Side effects

@kattrali
Copy link
Contributor Author

Made a slight change to the implementation. TransformBlock now provides the current managed object context, to avoid cross-thread communication if the block is called from a thread other than the main object context thread.

@stephencelis stephencelis mentioned this pull request Mar 27, 2014
@kattrali
Copy link
Contributor Author

Rebased to latest, the implementation is cleaner now since it is restricted to NSManagedObject+Mappings.m

* In the case that the transform is not operating on the same thread as the main
managed object context, the current context is provided to avoid operating on a
context from a different thread.
@kattrali kattrali closed this Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom NSDate format Dictionaries nested more than 1 level deep break findOrCreate:
1 participant