Recover changes in ClassMetadataFactoryTest::_createValidClassMetadata() lost during last merge
This commit is contained in:
parent
59e9d55077
commit
b09201ae88
@ -205,18 +205,19 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase
|
||||
{
|
||||
// Self-made metadata
|
||||
$cm1 = new ClassMetadata('Doctrine\Tests\ORM\Mapping\TestEntity1');
|
||||
$cm1->initializeReflection(new \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService);
|
||||
$cm1->setPrimaryTable(array('name' => '`group`'));
|
||||
// Add a mapped field
|
||||
$cm1->mapField(array('fieldName' => 'name', 'type' => 'varchar'));
|
||||
// Add a mapped field
|
||||
$cm1->mapField(array('fieldName' => 'id', 'type' => 'integer', 'id' => true));
|
||||
// and a mapped association
|
||||
$cm1->mapOneToOne(array('fieldName' => 'other', 'targetEntity' => 'Other', 'mappedBy' => 'this'));
|
||||
$cm1->mapOneToOne(array('fieldName' => 'other', 'targetEntity' => 'TestEntity1', 'mappedBy' => 'this'));
|
||||
// and an association on the owning side
|
||||
$joinColumns = array(
|
||||
array('name' => 'other_id', 'referencedColumnName' => 'id')
|
||||
);
|
||||
$cm1->mapOneToOne(array('fieldName' => 'association', 'targetEntity' => 'Other', 'joinColumns' => $joinColumns));
|
||||
$cm1->mapOneToOne(array('fieldName' => 'association', 'targetEntity' => 'TestEntity1', 'joinColumns' => $joinColumns));
|
||||
// and an id generator type
|
||||
$cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_AUTO);
|
||||
return $cm1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user