. */ /** * Doctrine_File_Index * * @package Doctrine * @subpackage File * @author Konsta Vesterinen * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version $Revision$ * @link www.phpdoctrine.com * @since 1.0 */ class Doctrine_File_Index extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('keyword', 'string', 255, array('notnull' => true, 'primary' => true)); $this->hasColumn('field', 'string', 50, array('notnull' => true, 'primary' => true)); $this->hasColumn('position', 'string', 255, array('notnull' => true, 'primary' => true)); $this->hasColumn('file_id', 'integer', 8, array('notnull' => true, 'primary' => true)); } public function setUp() { $this->hasOne('Doctrine_File', array('local' => 'file_id', 'foreign' => 'id', 'onDelete' => 'CASCADE', 'onUpdate' => 'CASCADE')); } }