Insert

The insert operation is a special case of deep cloning. In the case of an insert, the objects are not copied into the destination database; instead, they are moved into the new database. When this occurs, the source database is no longer valid, because it has been cannibalized when its objects were moved into the new database. If you override the deepClone() function, your objects will simply be cloned when an insert operation is called for. If you use the default form of deepClone(), cheap cloning is performed internally.

When an object is copied in this way, the ID map still contains two object IDs for each cloned object (the source ID and the destination ID), but these IDs point temporarily to the same object. When the insert operation finishes, the source database is deleted.