Quantcast
Channel: CoreData - Duplicate existing object - Stack Overflow
Viewing all articles
Browse latest Browse all 4

CoreData - Duplicate existing object

$
0
0

Hi would like to duplicate an object from my core data db. Right now I'm using

        movement2 = [NSEntityDescription                                     insertNewObjectForEntityForName:@"Movement"                                     inManagedObjectContext:self.managedObjectContext];        movement2.name = movement.name;        movement2.value = movement.value;        movement2.date = movement.date;        ... 

and it works. but...

Is there any way to copy all the values of movement to movement2, in one line of code?


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>