I have added a new field to my table Empresa
so I need to change my model. For not regenerate the whole things meaning model-forms-filters I decide to add it by hand (manually) so I'm trying to add a the property to BaseSdrivingEmpresa.class.php
as follow:
<?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,
));
}
}
But I get this error:
500 | Internal Server Error | Doctrine_Record_UnknownPropertyException
Any time I try to get the property to display it on a template:
$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() ?>
Where is my error?