Closed AlexKel closed 8 years ago
@AlexKel Hi Aleksandr, first of all, I feel your pain and understand what you have to deal with.
Hehehe, moving on. Thanks a lot for this PR, I'm sure it will be useful to a lot of people. I found some minor things, besides the typo that makes the build to fail. Great work with the unit tests, I wish more people were as detailed as you.
Please have a look at the PR that I sent to your fork here: https://github.com/AlexKel/NSManagedObject-HYPPropertyMapper/pull/1
Hello, Just merged your PR with refactoring, thanks for the input :)
By the way, this kind of helps with this issue: https://github.com/hyperoslo/NSManagedObject-HYPPropertyMapper/issues/71. At least until proper feature implementation :)
@AlexKel Good point! I'll add a new issue to document how to do that using transformables.
Thanks a lot again, you're the best! 💐
💥💥💥 Shipped in Sync 1.6.2 💥💥💥
Every once in a while a shitty API comes along :) I've been unfortunate to work with one recently...
I've had an issue with their date object... they've been storing them as strings:
"\Date(_timestamp_in_milliseconds_here_)\"
I've been usingSync
for this project and have been struggling with these dates as I need to be able to do a proper search in my Core Data by date, etc... So, what I figured out could be a solution is to support NSValueTransformers.In this small PR I've got it working. Anyone who want to transform value before it going to the database needs to implement
NSValueTransformer
subclass and specify it in their core data model.If OS for some reason fails to identify and auto-register your transformer, you can do this manually by using
setValueTransformer: forName:
class function ofNSValueTransfomer
.