From d9b9a5af702cc7e19db6592b7f859102728ff7fe Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 27 Jun 2007 17:45:05 +0000 Subject: [PATCH] --- models/Blog.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 models/Blog.php diff --git a/models/Blog.php b/models/Blog.php new file mode 100644 index 000000000..6fdefc39b --- /dev/null +++ b/models/Blog.php @@ -0,0 +1,31 @@ +loadTemplate('Taggable'); + } +} +class Taggable extends Doctrine_Template +{ + public function setUp() + { + $this->hasMany('[Component]Tag as Tag'); + } +} +class TagTemplate extends Doctrine_Template +{ + public function setTableDefinition() + { + $this->hasColumn('name', 'string', 100); + $this->hasColumn('description', 'string'); + } + public function setUp() + { + $this->hasOne('[Component]', array('onDelete' => 'CASCADE')); + } +}