From 0f9ec1f9986108b9e864ceb2c79a78f6c3b3d566 Mon Sep 17 00:00:00 2001 From: jwage Date: Tue, 22 Jan 2008 22:39:59 +0000 Subject: [PATCH] fixes #719 --- .../working-with-existing-databases.txt | 124 +++++++++++++++--- 1 file changed, 105 insertions(+), 19 deletions(-) diff --git a/manual/docs/en/getting-started/working-with-existing-databases.txt b/manual/docs/en/getting-started/working-with-existing-databases.txt index 40cf9b4e5..19bf40788 100644 --- a/manual/docs/en/getting-started/working-with-existing-databases.txt +++ b/manual/docs/en/getting-started/working-with-existing-databases.txt @@ -40,27 +40,113 @@ That's it! Now there should be a file called File.php in your myrecords director /** * This class has been auto-generated by the Doctrine ORM Framework - * Created: Saturday 10th of February 2007 01:03:15 PM */ -class File extends Doctrine_Record +abstract class BaseFile extends Doctrine_Record { - public function setTableDefinition() - { - $this->hasColumn('id', 'integer', 4, array('notnull' => true, - 'primary' => true, - 'unsigned' => true, - 'autoincrement' => true)); - $this->hasColumn('name', 'string', 150); - $this->hasColumn('size', 'integer', 8); - $this->hasColumn('modified', 'integer', 8); - $this->hasColumn('type', 'string', 10); - $this->hasColumn('content', 'string', null); - $this->hasColumn('path', 'string', null); - } - public function setUp() - { - - } + public function setTableDefinition() + { + $this->setTableName('file'); + $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('name', 'string', 150, array ( + 'alltypes' => + array ( + 0 => 'string', + ), + 'ntype' => 'varchar(150)', + 'fixed' => false, + 'values' => + array ( + ), + 'primary' => false, + 'notnull' => false, + 'autoincrement' => false, +)); + $this->hasColumn('size', 'integer', 8, array ( + 'alltypes' => + array ( + 0 => 'integer', + ), + 'ntype' => 'bigint(20)', + 'unsigned' => 0, + 'values' => + array ( + ), + 'primary' => false, + 'notnull' => false, + 'autoincrement' => false, +)); + $this->hasColumn('modified', 'integer', 8, array ( + 'alltypes' => + array ( + 0 => 'integer', + ), + 'ntype' => 'bigint(20)', + 'unsigned' => 0, + 'values' => + array ( + ), + 'primary' => false, + 'notnull' => false, + 'autoincrement' => false, +)); + $this->hasColumn('type', 'string', 10, array ( + 'alltypes' => + array ( + 0 => 'string', + ), + 'ntype' => 'varchar(10)', + 'fixed' => false, + 'values' => + array ( + ), + 'primary' => false, + 'notnull' => false, + 'autoincrement' => false, +)); + $this->hasColumn('content', 'string', null, array ( + 'alltypes' => + array ( + 0 => 'string', + 1 => 'clob', + ), + 'ntype' => 'text', + 'fixed' => false, + 'values' => + array ( + ), + 'primary' => false, + 'notnull' => false, + 'autoincrement' => false, +)); + $this->hasColumn('path', 'string', null, array ( + 'alltypes' => + array ( + 0 => 'string', + 1 => 'clob', + ), + 'ntype' => 'text', + 'fixed' => false, + 'values' => + array ( + ), + 'primary' => false, + 'notnull' => false, + 'autoincrement' => false, +)); + } }