Hello symfony users!
I have a comment on handling updated_at column in sfDoctine. Currently
its updated in preInsert method of sfDoctrineRecord class.
I think it should be removed. Updating of updated_at should only be in
preUpdate. It makes more sense to update "updated_at" only when the
record gets updated. What do you think? In not sure how its done in
propel.
public function preInsert($event)
{
// Set created_at and update_at to now, if they exist in this record
$now = date("Y-m-d H:i:s", time());
if ($this->getTable()->hasColumn('created_at'))
{
$this->rawSet('created_at', $now);
}
if ($this->getTable()->hasColumn('updated_at'))
{
$this->rawSet('updated_at', $now);
}
}
--
Mishal <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---