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