2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
2007-09-05 08:42:02 +04:00
|
|
|
class Song extends Doctrine_Record
|
|
|
|
{
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->hasOne('Album', array('local' => 'album_id',
|
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
|
|
|
}
|
|
|
|
public function setTableDefinition()
|
|
|
|
{
|
2007-09-02 18:24:49 +04:00
|
|
|
$this->hasColumn('album_id', 'integer');
|
|
|
|
$this->hasColumn('genre', 'string',20);
|
|
|
|
$this->hasColumn('title', 'string',30);
|
|
|
|
}
|
|
|
|
}
|