Got stuck on Day 6 - can't load new job
symfony doctrine:data-load
Error Not Null violation on column expires_at
All jobs have created_at values and all except the last one have also expires_at values.
If I add the expires_at value, the data is loaded, so the jobs.yml file should be OK.
This is my save function:
//lib/model/doctrine/JobeetJob.class.php:
class JobeetJob extends BaseJobeetJob
{
//.. get...Slug functions
public function save(Doctrine_Connection $conn = null)
{
if ($this->isNew() && !$this->getExpiresAt())
{
$now = $this->getCreatedAt() ? $this->getDateTimeObject('created_at')->format('U') : time();
$this->setExpiresAt(date('Y-m-d H:i:s', $now + 86400 * 30));
}
return parent::save($conn);
}
}
I also tried $this->setExpiresAt('2012-06-06 00:00:00') but no success.
Of course, I double checked the code, cleared the cache, checked the spaces, read all messages on the forum... still no clue.
I wonder if the save function is called at all. Should this be visible in the log file?
