1
0
mirror of synced 2025-01-07 09:37:11 +03:00
doctrine2/tests/models/forum/ForumEntry.php

36 lines
815 B
PHP
Raw Normal View History

<?php
#namespace Doctrine::Test::ORM::Models;
#use Doctrine::ORM::Entity;
2008-09-12 14:40:23 +04:00
class ForumEntry extends Doctrine_ORM_Entity
{
public $id;
public $topic;
static function construct() {
Doctrine_Common_VirtualPropertySystem::register(__CLASS__, 'id', 'int');
Doctrine_Common_VirtualPropertySystem::register(__CLASS__, 'topic', 'string');
}
public static function initMetadata($mapping)
{
$mapping->mapField(array(
'fieldName' => 'id',
'type' => 'integer',
'id' => true,
2008-07-27 23:38:56 +04:00
'idGenerator' => 'auto'
));
$mapping->mapField(array(
'fieldName' => 'topic',
'type' => 'string',
'length' => 50
));
}
}
?>