1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| abstract class BaseTDossier extends sfDoctrineRecord
{
public function setTableDefinition()
{
$this->setTableName('TDossier');
$this->hasColumn('numdossier', 'integer', 4, array(
'type' => 'integer',
'fixed' => 0,
'unsigned' => true,
'primary' => true,
'autoincrement' => false,
'length' => 4,
));
$this->hasColumn('annee', 'integer', 8, array(
'type' => 'integer',
'fixed' => 0,
'unsigned' => false,
'primary' => true,
'autoincrement' => false,
'length' => 8,
));
}
public function setUp()
{
parent::setUp();
$this->hasMany('TMedaille', array(
'local' => 'numdossier',
'foreign' => 'tdossier_numdossier'));
$this->hasMany('TMedaille as TMedaille_7', array(
'local' => 'numdossier',
'foreign' => 'tdossier_numdossier'));
}
} |
Partager