public function setTableDefinition() { $this->setTableName('search'); $this->hasColumn('name', 'string', 100, array ()); $this->hasColumn('ident', 'int', 11, array ()); $this->hasColumn('type', 'enum', null, array ( 'values' => array ( 0 => 'service', 1 => 'carbrand', 2 => 'region_o', 3 => 'region_g', 4 => 'region_k', 5 => 'region_l', 6 => 'postalcode', 7 => 'street', ),)); } $search = new Search(); $search->name = 'TestService'; $search->type = 'service'; $search->save();