Object relational mapping - Relations - Inheritance - One table many classes.php 410 Bytes
Newer Older
doctrine's avatar
doctrine committed
1 2 3
<?php
class Entity extends Doctrine_Record {
    public function setTableDefinition() {
4 5 6 7
        $this->hasColumn('name','string',30);
        $this->hasColumn('username','string',20);
        $this->hasColumn('password','string',16);
        $this->hasColumn('created','integer',11);                                     	
doctrine's avatar
doctrine committed
8 9 10 11 12 13 14
    }
}

class User extends Entity { }

class Group extends Entity { }
?>