<?php

/**
 * BaseProductTags
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $product_id
 * @property integer $tag_id
 * @property Product $Product
 * @property Tag $Tag
 * 
 * @method integer     getProductId()  Returns the current record's "product_id" value
 * @method integer     getTagId()      Returns the current record's "tag_id" value
 * @method Product     getProduct()    Returns the current record's "Product" value
 * @method Tag         getTag()        Returns the current record's "Tag" value
 * @method ProductTags setProductId()  Sets the current record's "product_id" value
 * @method ProductTags setTagId()      Sets the current record's "tag_id" value
 * @method ProductTags setProduct()    Sets the current record's "Product" value
 * @method ProductTags setTag()        Sets the current record's "Tag" value
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseProductTags extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('product_tags');
        $this->hasColumn('product_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('tag_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Product', array(
             'local' => 'product_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

        $this->hasOne('Tag', array(
             'local' => 'tag_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));
    }
}