1
0
mirror of synced 2025-02-03 22:09:26 +03:00
doctrine2/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC3579.DDC3579User.php

34 lines
607 B
PHP
Raw Normal View History

2015-11-05 12:11:29 +01:00
<?php
use Doctrine\ORM\Mapping\ClassMetadataInfo;
$metadata->mapField(
[
2015-11-05 12:11:29 +01:00
'id' => true,
'fieldName' => 'id',
'type' => 'integer',
'columnName' => 'user_id',
'length' => 150,
]
);
2015-11-05 12:11:29 +01:00
$metadata->mapField(
[
2015-11-05 12:11:29 +01:00
'fieldName' => 'name',
'type' => 'string',
'columnName'=> 'user_name',
'nullable' => true,
'unique' => false,
'length' => 250,
]
);
2015-11-05 12:11:29 +01:00
$metadata->mapManyToMany(
[
2015-11-05 12:11:29 +01:00
'fieldName' => 'groups',
'targetEntity' => 'DDC3579Group'
]
);
2015-11-05 12:11:29 +01:00
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);