Should I create subclass NSManagedObject or not?
Posted
by
TP
on Stack Overflow
See other posts from Stack Overflow
or by TP
Published on 2011-01-08T11:45:03Z
Indexed on
2011/01/08
11:54 UTC
Read the original article
Hit count: 225
Hi,
I have spent a few days learning and writing NSCoding and finally got it working. However, it took very long to archive and unarchive the (quite complex) object graph, which is unacceptable. After searching the internet for some time, I think the better way is to use core data.
Do you recommend that 1) I should rewrite all my classes as subclasses of NSManagedObject or 2) should I create an instance variable of NSManagedObject in each of my class so that any changes to the class also updates its core data representation? Doing either way will need significant changes to the exiting classes and I think I have to update lots of unit test cases as well if it changes the way the classes are initialized.
What do you recommend? I really don't want to head to the wrong approach again...
Thanks!
© Stack Overflow or respective owner