我明天可以在截止日期前跑步,有人可以帮帮我吗?这是我的错误。我多次检查了我的数据库,但仍然收到错误:
10/29/15 15:46:54,366 [1780] ERROR filter.ExceptionCatcherFilter -
Uncaught Exception: exception 'DaoException' with message
'SQLSTATE[42S22]: Column not found: 1054 Unknown column
'o.period_from' in 'field list'. Failing Query: "SELECT o.id AS o__id,
o.name AS o__name, o.hours_per_day AS o__hours_per_day, o.start_time
AS o__start_time, o.period_from AS o__period_from, o.period_to AS
o__period_to, o.end_time AS o__end_time FROM ohrm_work_shift o ORDER
BY o.name ASC"' in
C:\xampp\htdocs\ucmedhris4dev\symfony\plugins\orangehrmAdminPlugin\lib\dao\WorkShiftDao.php:34
这是我的基类
abstract class BaseWorkShift extends sfDoctrineRecord
{
public function setTableDefinition()
{
$this->setTableName('ohrm_work_shift');
$this->hasColumn('id', 'integer', null, array(
'type' => 'integer',
'primary' => true,
'autoincrement' => true,
));
$this->hasColumn('name', 'string', 260, array(
'type' => 'string',
'notnull' => true,
'length' => 260,
));
$this->hasColumn('hours_per_day as hoursPerDay', 'decimal', 4, array(
'type' => 'decimal',
'notnull' => true,
'scale' => false,
'length' => 4,
));
$this->hasColumn('start_time', 'time', null, array(
'type' => 'time',
'notnull' => true,
));
$this->hasColumn('period_from', 'string', null, array(
'type' => 'string',
'notnull' => true,
));
$this->hasColumn('period_to', 'string', null, array(
'type' => 'string',
'notnull' => true,
));
$this->hasColumn('end_time', 'time', null, array(
'type' => 'time',
'notnull' => true,
));
}
public function getPeriodFrom(){
return parent::_get('period_from');
}
public function getPeriodTo(){
return parent::_get('period_to');
}
public function setUp()
{
parent::setUp();
$this->hasMany('EmployeeWorkShift', array(
'local' => 'id',
'foreign' => 'work_shift_id'));
}
}