1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/codes/Object relational mapping - Relations - Inheritance - One table one class.php
2007-02-23 23:02:59 +00:00

27 lines
746 B
PHP

<?php
class Entity extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn("name","string",30);
$this->hasColumn("username","string",20);
$this->hasColumn("password","string",16);
$this->hasColumn("created","integer",11);
}
}
class User extends Entity {
public function setTableDefinition() {
// the following method call is needed in
// one-table-one-class inheritance
parent::setTableDefinition();
}
}
class Group extends Entity {
public function setTableDefinition() {
// the following method call is needed in
// one-table-one-class inheritance
parent::setTableDefinition();
}
}
?>