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

31 lines
734 B
PHP
Raw Normal View History

2008-05-08 18:17:35 +04:00
<?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'
));
2008-08-16 23:40:59 +04:00
$mapping->mapManyToOne(array(
2008-08-16 23:40:59 +04:00
'fieldName' => 'category',
'targetEntity' => 'ForumCategory',
'joinColumns' => array('category_id' => 'id')
2008-08-16 23:40:59 +04:00
));
2008-05-08 18:17:35 +04:00
}
}