3070 Posts in 869 Topics by 651 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 623 Views |
-
Override the "Created" property

13 August 2011 at 7:15pm
Hi,
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.E.g.:
...
$o = new CustomDataObject();
$o->Created = '2000-01-01 00:00:00';
$o->write();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 ?
Greetings,
Rob -
Re: Override the "Created" property

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...
| 623 Views | ||
|
Page:
1
|
Go to Top |

