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')); + } +}