2008-05-08 18:17:35 +04:00
|
|
|
<?php
|
2008-07-21 00:13:24 +04:00
|
|
|
class ForumBoard extends Doctrine_Entity
|
|
|
|
{
|
|
|
|
public static function initMetadata($mapping)
|
|
|
|
{
|
2008-07-10 21:17:58 +04:00
|
|
|
/*$metadata->mapField(array(
|
|
|
|
'fieldName' => 'id',
|
|
|
|
'id' => true,
|
|
|
|
'type' => 'integer',
|
|
|
|
'length' => 4
|
|
|
|
));
|
|
|
|
*/
|
2008-07-21 00:13:24 +04:00
|
|
|
$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'
|
|
|
|
));
|
2008-08-16 23:40:59 +04:00
|
|
|
|
2008-08-22 13:37:03 +04:00
|
|
|
$mapping->mapManyToOne(array(
|
2008-08-16 23:40:59 +04:00
|
|
|
'fieldName' => 'category',
|
2008-07-10 21:17:58 +04:00
|
|
|
'targetEntity' => 'ForumCategory',
|
|
|
|
'joinColumns' => array('category_id' => 'id')
|
2008-08-16 23:40:59 +04:00
|
|
|
));
|
2008-05-08 18:17:35 +04:00
|
|
|
}
|
|
|
|
}
|