3372 Posts in 998 Topics by 712 members
|Go to End|
13 August 2011 at 7:15pm
because of migrating data to a new SS Website i have to import data.
The import itself is handled by a custom "Task".
I need to set the "Created" (datetime) property while importing.
But SS ignores the set values.
$o = new CustomDataObject();
$o->Created = '2000-01-01 00:00:00';
After saving the Created datetime is always the datetime of execution - NOT my given value.
I do not want to add a new property like "CreatedAt" to the DataObject.
Is it possible to override this behaviour ?
14 August 2011 at 4:40am
the write() function will set Created to 'now' on every new insert. You could maybe use the return ID to update the record after it's written...
|Go to Top|