1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/models/Album.php
2007-09-05 04:42:02 +00:00

18 lines
492 B
PHP

<?php
class Album extends Doctrine_Record
{
public function setUp()
{
$this->hasMany('Song', array('local' => 'id', 'foreign' => 'album_id'));
$this->hasOne('User', array('local' => 'user_id',
'foreign' => 'id',
'onDelete' => 'CASCADE'));
}
public function setTableDefinition()
{
$this->hasColumn('user_id', 'integer');
$this->hasColumn('name', 'string',20);
}
}