1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/tests/models/cms/CmsPhonenumber.php

28 lines
681 B
PHP
Raw Normal View History

<?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')
));
}
}