Setting existing content on new dm_document with DFC
I'm writing a migration program that will create a new instance of a object_type 1. It will then take attribute values from an existing instance of object_type 2 and set them on the new object_type 1 instance. It will also make a copy of the content on instance1 and set it on instance2. Some of the content on instance1 is very large (100's of MB). As far as I can tell, DFC only provides setting of content from 1 instance to another using byte array streams. This is inefficient and could blow out memory in the JVM using byte array streams.
I would like to set the I_content_id on instance2 to the I_conent_id that is on instance1. I'm aware that a new parent_id value on the content object must also be created. I suspect that there is further management as well that has to occur.
Does anyone know how to set content on a new dm_document (that has no present content) with an existing content that is in the repository, without using byte array streams?