rendered paste body<?phpclass Promotion extends BaseRecord{ public function setTableDefinition() { $this->setTableName('promotions'); $this->hasColumn('id', 'integer', 4, array ( 'alltypes' => array ( 0 => 'integer', ), 'ntype' => 'int(10) unsigned', 'unsigned' => 1, 'values' => array ( ), 'primary' => true, 'notnull' => true, 'autoincrement' => true, )); $this->hasColumn('product', 'integer', 4, array ( 'alltypes' => array ( 0 => 'integer', ), 'ntype' => 'int(10) unsigned', 'unsigned' => 1, 'values' => array ( ), 'primary' => false, 'default' => '', 'notnull' => true, 'autoincrement' => false, )); $this->hasColumn('position', 'integer', 4, array ( 'alltypes' => array ( 0 => 'integer', ), 'ntype' => 'int(10) unsigned', 'unsigned' => 1, 'values' => array ( ), 'primary' => false, 'default' => '', 'notnull' => true, 'autoincrement' => false, )); } public function setUp() { $this -> hasOne('Product', array('local' => 'product', 'foreign' => 'id')); }}?>