Source

zf-form-builder / www / system / modules / blog / library / Base / Comment.php

Full commit
<?php


abstract class Blog_Base_Comment extends DoctrineX_Record
{
    public function setTableDefinition()
    {
        $this->setTableName('blog__comment');
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('email', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('site', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => '255',
             ));
        $this->hasColumn('comment', 'string', null, array(
             'type' => 'string',
             'notnull' => true,
             ));
        $this->hasColumn('user_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('Blog_Entry', array(
             'local' => 'entry_id',
             'foreign' => 'id'));

        $nestedset0 = new Doctrine_Template_NestedSet(array(
             'hasManyRoots' => true,
             'rootColumnName' => 'entry_id',
             ));
        $this->actAs($nestedset0);
    }
}