setTableName('page'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('page_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('content', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('in_menu', 'boolean', null, array( 'type' => 'boolean', 'default' => true, )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Page', array( 'local' => 'page_id', 'foreign' => 'id')); $this->hasMany('Page as SubPages }', array( 'local' => 'id', 'foreign' => 'page_id')); $sluggable0 = new Doctrine_Template_Sluggable(); $timestampable0 = new Doctrine_Template_Timestampable(); $auditable0 = new Doctrine_Template_Auditable(array( 'user_id' => array( 'expression' => array( 'symfony_context' => 'getUser()->getAttribute(\'user\')->id', ), ), )); $sortable0 = new Doctrine_Template_Sortable(array( 'uniqueBy' => array( 0 => 'page_id', ), )); $this->actAs($sluggable0); $this->actAs($timestampable0); $this->actAs($auditable0); $this->actAs($sortable0); } }