copy To Realm
Creates a copy of an object in the Realm.
This will create a copy of an object and all it's children. Any already managed objects will not be copied, including the root instance
. So invoking this with an already managed object is a no-operation.
Return
The managed version of the instance
.
Parameters
instance
The object to create a copy from.
Throws
if the class has a primary key field and an object with the same primary key already exists.