1
0
Fork 0
mirror of synced 2025-04-03 13:23:37 +03:00

[2.0][DDC-31] Fixed.

This commit is contained in:
romanb 2009-10-03 22:00:01 +00:00
parent fe5a356aa0
commit b9ec48d68e

View file

@ -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',