setColumn('name', 'string', 150); $class->setColumn('foreign_id', 'integer', 10, array ('unique' => true)); $class->hasOne('gnatEmail as Email', array('local'=> 'foreign_id', 'foreign'=>'id', 'onDelete'=>'CASCADE')); } }