1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests/models/cms/CmsPhonenumber.php

28 lines
681 B
PHP
Executable File

<?php
class CmsPhonenumber extends Doctrine_Entity
{
#protected $user_id;
#protected $phonenumber;
public static function initMetadata($mapping)
{
$mapping->mapField(array(
'fieldName' => 'user_id',
'type' => 'integer',
'length' => 4
));
$mapping->mapField(array(
'fieldName' => 'phonenumber',
'type' => 'string',
'length' => 50,
'id' => true
));
$mapping->mapManyToOne(array(
'fieldName' => 'user',
'targetEntity' => 'CmsUser',
'joinColumns' => array('user_id' => 'id')
));
}
}