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
| class MonObjetTranslation extends sfDoctrineRecord
{
public function postUpdate($event) {
}
public function setTableDefinition()
{
$this->setTableName('mon_objet_translation');
$this->hasColumn('id', 'integer', null, array(
'type' => 'integer',
'primary' => true,
'autoincrement' => true,
));
// Puis ajout de tous les champs nécessaires
// ..............
// Cette colonne est la seule différence que j'imagine
$this->hasColumn('lang', 'string', 2, array(
'type' => 'string',
'length' => 2,
));
$this->option('collate', 'utf8_unicode_ci');
$this->option('charset', 'utf8');
}
public function setUp()
{
parent::setUp();
}
} |
Partager