From e8bb04a66ef037786c58d7273dbddd02095d7edd Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Fri, 30 Nov 2007 22:49:04 +0000 Subject: [PATCH] Reverted change. actAs() and loadTemplate() currently only work in the setTableDefinition() --- lib/Doctrine/Import/Builder.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/Import/Builder.php b/lib/Doctrine/Import/Builder.php index fc864a2d0..adc49c1d6 100644 --- a/lib/Doctrine/Import/Builder.php +++ b/lib/Doctrine/Import/Builder.php @@ -325,7 +325,7 @@ END; * @param string $table * @param array $tableColumns */ - public function buildTableDefinition(array $options, array $columns, array $relations, array $indexes, array $attributes, array $tableOptions) + public function buildTableDefinition(array $options, array $columns, array $relations, array $indexes, array $attributes, array $tableOptions, array $templates, array $actAs) { $ret = array(); @@ -376,6 +376,13 @@ END; $i++; $ret[$i] = $this->buildTableOptions($tableOptions); + $i++; + + $ret[$i] = $this->buildTemplates($templates); + $i++; + + $ret[$i] = $this->buildActAs($actAs); + $i++; $code = implode("\n", $ret); $code = trim($code); @@ -585,12 +592,6 @@ END; $ret[$i] = " ".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => \''.$options['inheritance']['keyValue'].'\'));'; } - $ret[$i] = $this->buildTemplates($templates); - $i++; - - $ret[$i] = $this->buildActAs($actAs); - $i++; - $code = implode("\n", $ret); $code = trim($code); @@ -622,7 +623,7 @@ END; $extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:$this->_baseClassName; if ( ! (isset($options['no_definition']) && $options['no_definition'] === true)) { - $definition = $this->buildTableDefinition($options, $columns, $relations, $indexes, $attributes, $tableOptions); + $definition = $this->buildTableDefinition($options, $columns, $relations, $indexes, $attributes, $tableOptions, $templates, $actAs); $setUp = $this->buildSetUp($options, $columns, $relations, $templates, $actAs); } else { $definition = null;