1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Rename method and refactor code a bit

This commit is contained in:
Benjamin Eberlei 2011-10-31 23:21:11 +01:00
parent abb129028a
commit c965d231b1

View File

@ -145,7 +145,7 @@ class SchemaTool
$this->_gatherRelationsSql($class, $table, $schema);
// Add the discriminator column
$discrColumnDef = $this->_getDiscriminatorColumnDefinition($class, $table);
$this->addDiscriminatorColumnDefinition($class, $table);
// Aggregate all the information from all classes in the hierarchy
foreach ($class->parentClasses as $parentClassName) {
@ -177,7 +177,7 @@ class SchemaTool
// Add the discriminator column only to the root table
if ($class->name == $class->rootEntityName) {
$discrColumnDef = $this->_getDiscriminatorColumnDefinition($class, $table);
$this->addDiscriminatorColumnDefinition($class, $table);
} else {
// Add an ID FK column to child tables
/* @var Doctrine\ORM\Mapping\ClassMetadata $class */
@ -267,7 +267,7 @@ class SchemaTool
* @return array The portable column definition of the discriminator column as required by
* the DBAL.
*/
private function _getDiscriminatorColumnDefinition($class, $table)
private function addDiscriminatorColumnDefinition($class, $table)
{
$discrColumn = $class->discriminatorColumn;