Answer by Ivorius for CoreData - Duplicate existing object
I've made a rudimentary duplicate extension for NSManagedObject (based on @coverback's answer). Use with care (though for me it works so far)Swift 4:enum CopyBehavior { case none, copy,...
View ArticleAnswer by coverback for CoreData - Duplicate existing object
NSManagedObject, unlike NSObject, provides an API to iterate over its attributes and relationships. Or, rather, it's entity description does. It isn't a one-liner, though.movement2 =...
View ArticleAnswer by yuji for CoreData - Duplicate existing object
There's no method in the API to copy NSManagedObjects, since they don't conform to NSCopying, nor to NSCoding. This makes sense considering that it's often not clear how you would want to copy such an...
View ArticleCoreData - Duplicate existing object
Hi would like to duplicate an object from my core data db. Right now I'm using movement2 = [NSEntityDescription insertNewObjectForEntityForName:@"Movement"...
View Article
More Pages to Explore .....