gonzalezreal / Groot

From JSON to Core Data and back.
Other
534 stars 61 forks source link

possible to use managed the object's 'objectID' as a JSONKeyPath? #63

Closed amitailanciano closed 8 years ago

amitailanciano commented 8 years ago

I do not have an explicit id field in any of my core data entities, but I would like to have a unique identifier for serialization -- in my application I use the NSManagedObject objectID property as the unique identifier, is it possible to have Groot serialize it along with the rest of my fields?

gonzalezreal commented 8 years ago

Sorry, this is not possible at the moment.

chriswill0w commented 7 years ago

this would be a really nice feature for existing projects which want to adopt Groot. what prevents this from being implemented? Is there another workaround? @gonzalezreal

gonzalezreal commented 7 years ago

There is nothing that prevents this for being implemented. IMHO is a little bit out of scope, but perfectly possible to do it. To be honest, I don't have much time these days, so any PR is welcome, as long as the new functionality is backwards compatible, explicitly opt-in and covered by unit tests.

chriswill0w commented 7 years ago

thank you for your reply! I decided to use my own UUID because the problem with the objectID is that it might change.