setTableName('articles'); $this->hasColumn('id', 'integer', 4, array('type' => 'integer', 'autoincrement' => true, 'primary' => true, 'length' => '4')); $this->hasColumn('name', 'string', 100, array('notnull' => true, 'type' => 'string', 'length' => '100')); } public function setUp() { $this->hasMany('Comment as Comments', array('local' => 'id', 'foreign' => 'article_id')); } }