Forums / Developer / Fixing object_id while importing Data

Fixing object_id while importing Data

Author Message

Mohamed Haimoura

Thursday 04 December 2008 2:50:38 am

Hi,
I'm trying to do an import from 3.9 to 4, and i have many relations between object, so i have to conserve dependencies between object while creating them in the import script.
In my import script i have :

$contentObject = & $class->instantiate();
$contentObject->setAttribute( 'remote_id', $remoteID ) 

i want to know if i can do

$contentObject->setAttribute( 'id', $objetc_id );

In order to attribute a specific (not automatic) value to the object_id.

Thanks