Quantcast
Channel: CoreData - Duplicate existing object - Stack Overflow
Browsing latest articles
Browse All 4 View Live

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 Article



Answer 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 Article

Answer 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 Article

CoreData - 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
Browsing latest articles
Browse All 4 View Live




Latest Images