From registration.entity.inc:
public function save() {
// set a default state if not provided
if (!$this->state || $this->state == -1) {
$default_state = registration_get_default_state();
if ($default_state) {
$this->state = $default_state->internalIdentifier();
}
}
$this->updated = REQUEST_TIME;
if (!$this->registration_id) {
$this->created = REQUEST_TIME;
}
return parent::save();
}
Even if a registration is created and created/updated are written to, it is overwritten on the first save. You may be asking why I am trying to do this- at the moment I am importing 22-25k orders from a legacy system into Drupal Commerce, combined with Commerce Registration / Registration. The only way around this I have found was loading the entity after saving it (ouch) to write the time values, then saving it again.
In my case, retaining the timestamp as they were is crucial- and for possibly others trying to utilize Migrate. Is there any other way around this?
Comments
Comment #1
kevinquillen commentedPossible workaround:
Comment #2
levelos commentedLooks reasonable.