<?php

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

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

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