root/tags/0.10.0/models/App_Category.php
| Revision 2353, 366 bytes (checked in by meus, 16 months ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | class App_Category extends Doctrine_Record { |
| 3 | public function setTableDefinition() { |
| 4 | $this->hasColumn('name', 'string', 32); |
| 5 | $this->hasColumn('parent_id', 'integer'); |
| 6 | } |
| 7 | public function setUp() { |
| 8 | $this->hasMany('App', 'App.app_category_id'); |
| 9 | $this->hasMany('App_Category as Parent', 'App_Category.parent_id'); |
| 10 | } |
| 11 | } |
Note: See TracBrowser
for help on using the browser.