[2.0][DDC-31] Fixed.
This commit is contained in:
parent
fe5a356aa0
commit
b9ec48d68e
1 changed files with 10 additions and 8 deletions
|
@ -1566,14 +1566,14 @@ final class ClassMetadata
|
||||||
*/
|
*/
|
||||||
public function setDiscriminatorColumn($columnDef)
|
public function setDiscriminatorColumn($columnDef)
|
||||||
{
|
{
|
||||||
$this->discriminatorColumn = $columnDef;
|
if ($columnDef !== null) {
|
||||||
|
if ( ! isset($columnDef['name'])) {
|
||||||
if ( ! isset($columnDef['fieldName'])) {
|
throw new MappingException("'name' attribute is mandatory for discriminator columns.");
|
||||||
$this->discriminatorColumn['fieldName'] = $columnDef['name'];
|
}
|
||||||
}
|
if ( ! isset($columnDef['fieldName'])) {
|
||||||
|
$columnDef['fieldName'] = $columnDef['name'];
|
||||||
if ( ! isset($columnDef['name'])) {
|
}
|
||||||
$this->discriminatorColumn['name'] = $this->discriminatorColumn['fieldName'];
|
$this->discriminatorColumn = $columnDef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1883,6 +1883,7 @@ final class ClassMetadata
|
||||||
'customRepositoryClassName',
|
'customRepositoryClassName',
|
||||||
'discriminatorColumn',
|
'discriminatorColumn',
|
||||||
'discriminatorValue',
|
'discriminatorValue',
|
||||||
|
'discriminatorMap',
|
||||||
'fieldMappings',
|
'fieldMappings',
|
||||||
'fieldNames',
|
'fieldNames',
|
||||||
'generatorType',
|
'generatorType',
|
||||||
|
@ -1900,6 +1901,7 @@ final class ClassMetadata
|
||||||
'namespace',
|
'namespace',
|
||||||
'parentClasses',
|
'parentClasses',
|
||||||
'primaryTable',
|
'primaryTable',
|
||||||
|
'resultColumnNames',
|
||||||
'rootEntityName',
|
'rootEntityName',
|
||||||
'sequenceGeneratorDefinition',
|
'sequenceGeneratorDefinition',
|
||||||
'subClasses',
|
'subClasses',
|
||||||
|
|
Loading…
Add table
Reference in a new issue