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