/** * Gets a portable column definition as required by the DBAL for the discriminator * column of a class. * * @param ClassMetadata $class * @return array The portable column definition of the discriminator column as required by * the DBAL. */ private function _getDiscriminatorColumnDefinition($class, $table) { $discrColumn = $class->discriminatorColumn; if (!isset($discrColumn['type']) || strtolower($discrColumn['type']) == 'string' && $discrColumn['length'] === null) { $discrColumn['type'] = 'string'; $discrColumn['length'] = 255; } $table->createColumn($class->getQuotedDiscriminatorColumnName($this->_platform), $discrColumn['type'], array('length' => $discrColumn['length'], 'notnull' => true)); }