1
0
mirror of synced 2025-01-05 16:53:21 +03:00
doctrine2/tests/models/forum/ForumUser.php
2008-02-11 19:56:26 +00:00

22 lines
719 B
PHP

<?php
class ForumUser extends Doctrine_Record
{
public static function initMetadata($class)
{
// inheritance mapping
$class->setInheritanceType(Doctrine::INHERITANCETYPE_JOINED, array(
'discriminatorColumn' => 'dtype',
'discriminatorMap' => array(
1 => 'ForumUser',
2 => 'ForumAdministrator')
));
$class->setSubclasses(array('ForumAdministrator'));
// property mapping
$class->addMappedColumn('id', 'integer', 4, array(
'primary' => true,
'autoincrement' => true));
$class->addMappedColumn('username', 'string', 50);
}
}