1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/tests/models/forum/ForumBoard.php
2008-12-18 14:08:11 +00:00

31 lines
734 B
PHP
Executable File

<?php
class ForumBoard
{
public $id;
public $position;
public $category;
public static function initMetadata($mapping)
{
$mapping->mapField(array(
'fieldName' => 'id',
'type' => 'integer',
'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')
));
}
}