setTableName('comments'); $this->hasColumn('id', 'integer', 4, array('type' => 'integer', 'autoincrement' => true, 'primary' => true, 'length' => '4')); $this->hasColumn('sender', 'string', 100, array('notnull' => true, 'type' => 'string', 'length' => '100')); $this->hasColumn('article_id', 'integer', 4, array('notnull' => true, 'type' => 'integer', 'length' => '4')); } public function setUp() { $this->hasOne('Article', array('local' => 'article_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); } }