<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('SongGenres', 'doctrine');

/**
 * BaseSongGenres
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $song_id
 * @property integer $genre_id
 * @property Genre $Genre
 * @property Song $Song
 * 
 * @method integer    getId()       Returns the current record's "id" value
 * @method integer    getSongId()   Returns the current record's "song_id" value
 * @method integer    getGenreId()  Returns the current record's "genre_id" value
 * @method Genre      getGenre()    Returns the current record's "Genre" value
 * @method Song       getSong()     Returns the current record's "Song" value
 * @method SongGenres setId()       Sets the current record's "id" value
 * @method SongGenres setSongId()   Sets the current record's "song_id" value
 * @method SongGenres setGenreId()  Sets the current record's "genre_id" value
 * @method SongGenres setGenre()    Sets the current record's "Genre" value
 * @method SongGenres setSong()     Sets the current record's "Song" value
 * 
 * @package    streeme
 * @subpackage model
 * @author     Richard Hoar
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseSongGenres extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('song_genres');
        $this->hasColumn('id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             'autoincrement' => true,
             ));
        $this->hasColumn('song_id', 'integer', null, array(
             'type' => 'integer',
             ));
        $this->hasColumn('genre_id', 'integer', null, array(
             'type' => 'integer',
             ));


        $this->index('song_id_index', array(
             'fields' => 
             array(
              0 => 'song_id',
             ),
             ));

        $this->setAttribute(Doctrine_Core::ATTR_EXPORT, 'table');

        $this->option('collate', 'utf8_unicode_ci');
        $this->option('charset', 'utf8');
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Genre', array(
             'local' => 'genre_id',
             'foreign' => 'id'));

        $this->hasOne('Song', array(
             'local' => 'song_id',
             'foreign' => 'id'));
    }
}