* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ */ abstract class BaseRegion extends sfDoctrineRecord { public function setTableDefinition() { $this->setTableName('region'); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'length' => 255, )); $this->hasColumn('priority', 'integer', null, array( 'type' => 'integer', 'notnull' => true, 'default' => 100, )); $this->hasColumn('coords', 'clob', null, array( 'type' => 'clob', )); $this->option('collate', 'utf8_czech_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasMany('Profile as Jobs', array( 'local' => 'id', 'foreign' => 'region_id')); $this->hasMany('JobRegionRelation as JobRegionRelations', array( 'local' => 'id', 'foreign' => 'region_id')); $this->hasMany('Banner as Banners', array( 'refClass' => 'BannerRegionRelation', 'local' => 'region_id', 'foreign' => 'banner_id')); $this->hasMany('BannerRegionRelation as BannerRegionRelations', array( 'local' => 'id', 'foreign' => 'region_id')); $this->hasMany('Event as Events', array( 'local' => 'id', 'foreign' => 'region_id')); $sluggable0 = new Doctrine_Template_Sluggable(array( 'fields' => array( 0 => 'name', ), 'unique' => true, 'builder' => array( 0 => 'saInflector', 1 => 'urlize', ), )); $this->actAs($sluggable0); } }