1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests/models/forum/ForumBoard.php
2008-09-12 10:40:23 +00:00

35 lines
910 B
PHP
Executable File

<?php
class ForumBoard extends Doctrine_ORM_Entity
{
public static function initMetadata($mapping)
{
/*$metadata->mapField(array(
'fieldName' => 'id',
'id' => true,
'type' => 'integer',
'length' => 4
));
*/
$mapping->mapField(array(
'fieldName' => 'id',
'type' => 'integer',
'length' => 4,
'id' => true
));
$mapping->mapField(array(
'fieldName' => 'position',
'type' => 'integer'
));
$mapping->mapField(array(
'fieldName' => 'category_id',
'type' => 'integer'
));
$mapping->mapManyToOne(array(
'fieldName' => 'category',
'targetEntity' => 'ForumCategory',
'joinColumns' => array('category_id' => 'id')
));
}
}