root/branches/0.9/models/Author.php
| Revision 2420, 411 bytes (checked in by jackbravo, 16 months ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | class Author extends Doctrine_Record |
| 3 | { |
| 4 | public function setUp() |
| 5 | { |
| 6 | $this->hasOne('Book', array('local' => 'book_id', |
| 7 | 'foreign' => 'id', |
| 8 | 'onDelete' => 'CASCADE')); |
| 9 | } |
| 10 | public function setTableDefinition() |
| 11 | { |
| 12 | $this->hasColumn('book_id', 'integer'); |
| 13 | $this->hasColumn('name', 'string',20); |
| 14 | } |
| 15 | } |
Note: See TracBrowser
for help on using the browser.