1
0
mirror of synced 2025-01-19 06:51:40 +03:00
doctrine2/tests/models/forum/Forum_User.php

22 lines
723 B
PHP
Raw Normal View History

2008-02-11 17:08:22 +00:00
<?php
class Forum_User extends Doctrine_Record
{
public static function initMetadata($class)
{
// inheritance mapping
$class->setInheritanceType(Doctrine::INHERITANCETYPE_JOINED, array(
'discriminatorColumn' => 'dtype',
'discriminatorMap' => array(
1 => 'Forum_User',
2 => 'Forum_Administrator')
));
$class->setSubclasses(array('Forum_Administrator'));
// property mapping
$class->addMappedColumn('id', 'integer', 4, array(
'primary' => true,
'autoincrement' => true));
$class->addMappedColumn('username', 'string', 50);
}
}