[eluser]sankai[/eluser]
[quote author="sankai" date="1225846368"]I try update my data and it's success,but the fields "updated_on" don't be auto update!
I had setting in model class follow topics "Automated Timestamps" guide as
Code:
var $created_field = 'created_on';
var $updated_field = 'updated_on';
var $local_time = TRUE;
It's seem to be lose efficacy.
Is any more options to setting or notes? :-S[/quote]
I try to debug by myself.
The datamapper version is 1.4.5
I find it on line 428 in libraries/datamapper.php
source:
Code:
if ($field == $this->updated_field)
{
// Update updated datetime
$this->{$field} = $timestamp;
}
fixed:
Code:
if ($field == $this->updated_field)
{
// Update updated datetime
$this->{$field} = $timestamp;
// Register changed existing
array_push($this->changed_existing,$field);
}