setTableName('companies'); $this -> hasColumn('name', 'string', 45); $this -> hasColumn('www', 'string', 45); $this -> hasColumn('logo', 'string', 45); $this -> hasColumn('product_manager', 'integer'); $this -> option('type', 'INNODB'); $this -> option('collate', 'utf8_general_ci'); $this -> option('charset', 'utf8'); } public function setUp() { $this -> hasMany('Product as Products', array('local' => 'id', 'foreign' => 'company')); $this -> hasOne('ProductManager', array('local' => 'product_manager', 'foreign' => 'id')); } } ?>