내 테이블 Empresa
에 새 필드를 추가 했으므로 모델을 변경해야합니다. 모델 폼 필터 내가 (수동) 수동으로 추가하기로 결정을 의미하는 전체 일을 재생 그래서 나는 다음과 같이 BaseSdrivingEmpresa.class.php
에 속성을 추가하려고 해요없는 경우 :Symfony1.4 및 Doctrine의 기본 모델에 손으로 속성 추가
<?php
/**
* BaseSdrivingEmpresa
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $umbralvoz
*
* @method integer getUmbralvoz() Returns the current record's "umbralvoz" value
* @method SdrivingEmpresa setUmbralvoz() Sets the current record's "umbralvoz" value
*
* @package isecurdriving
* @subpackage model
* @author Your name here
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
*/
abstract class BaseSdrivingEmpresa extends sfDoctrineRecord {
public function setTableDefinition() {
$this->setTableName('sdriving_empresa');
$this->hasColumn('umbralvoz', 'integer', 11, array(
'type' => 'integer',
'notnull' => false,
'default' => 60,
'length' => 11,
));
}
}
하지만이 오류가 발생합니다 :
500 | Internal Server Error | Doctrine_Record_UnknownPropertyException
나는 속성은 템플릿에 표시 할 얻으려고 할 때마다 :
$id_empresa = $this->getUser()->getGuardUser()->getSfGuardUserProfile()->getIdempresa();
$this->sdriving_configuracion = Doctrine_Core::getTable('SdrivingEmpresa')->createQuery('a')->where('a.idempresa = ?', $id_empresa)->execute();
<?php echo $sdriving_configuracion[0]->SdrivingEmpresa->getUmbralvoz() ?>
내 오류가 무엇입니까?