Forums / Developer / Fixing object_id while importing Data

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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