[DDC-2300] Fix version xml mapping and serialization of ClassMetadata.
This commit is contained in:
parent
4982e2b6b0
commit
d0419782bd
@ -234,6 +234,7 @@ class XmlDriver extends FileDriver
|
||||
|
||||
if (isset($mapping['version'])) {
|
||||
$metadata->setVersionMapping($mapping);
|
||||
unset($mapping['version']);
|
||||
}
|
||||
|
||||
$metadata->mapField($mapping);
|
||||
@ -686,7 +687,7 @@ class XmlDriver extends FileDriver
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['version']) && $fieldMapping['version']) {
|
||||
$mapping['version'] = $fieldMapping['version'];
|
||||
$mapping['version'] = $this->evaluateBoolean($fieldMapping['version']);
|
||||
}
|
||||
|
||||
if (isset($fieldMapping['column-definition'])) {
|
||||
|
@ -300,6 +300,7 @@ class YamlDriver extends FileDriver
|
||||
|
||||
if (isset($mapping['version'])) {
|
||||
$metadata->setVersionMapping($mapping);
|
||||
unset($mapping['version']);
|
||||
}
|
||||
|
||||
$metadata->mapField($mapping);
|
||||
|
@ -159,6 +159,8 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
|
||||
{
|
||||
$this->assertTrue($class->isVersioned);
|
||||
$this->assertEquals("version", $class->versionField);
|
||||
|
||||
$this->assertFalse(isset($class->fieldMappings['version']['version']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user