Changeset 3961 for branches/0.10/lib/Doctrine/Import/Builder.php
- Timestamp:
- 03/10/08 02:41:15 (2 years ago)
- Files:
-
- 1 modified
-
branches/0.10/lib/Doctrine/Import/Builder.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.10/lib/Doctrine/Import/Builder.php
r3955 r3961 312 312 public function buildTableDefinition(array $definition) 313 313 { 314 if (isset($definition['inheritance']['type']) && $definition['inheritance']['type'] == 'simple') { 315 return; 316 } 317 314 318 $ret = array(); 315 319 316 320 $i = 0; 317 321 318 if (isset($definition['inheritance'][' extends']) && ! (isset($definition['override_parent']) && $definition['override_parent'] == true)) {322 if (isset($definition['inheritance']['type']) && $definition['inheritance']['type'] == 'concrete') { 319 323 $ret[$i] = " parent::setTableDefinition();"; 320 324 $i++; … … 323 327 if (isset($definition['tableName']) && !empty($definition['tableName'])) { 324 328 $ret[$i] = " ".'$this->setTableName(\''. $definition['tableName'].'\');'; 325 326 329 $i++; 327 330 } … … 344 347 if (isset($definition['options']) && is_array($definition['options']) && !empty($definition['options'])) { 345 348 $ret[$i] = $this->buildOptions($definition['options']); 349 $i++; 350 } 351 352 if (isset($definition['inheritance']['subclasses']) && ! empty($definition['inheritance']['subclasses'])) { 353 $ret[$i] = " ".'$this->setSubClasses('. $this->varExport($definition['inheritance']['subclasses']).');'; 346 354 $i++; 347 355 } … … 364 372 */ 365 373 public function buildSetUp(array $definition) 366 { 374 { 375 if (isset($definition['inheritance']['type']) && ($definition['inheritance']['type'] == 'simple' || $definition['inheritance']['type'] == 'column_aggregation')) { 376 return; 377 } 378 367 379 $ret = array(); 368 380 $i = 0; 369 381 370 if (isset($definition['inheritance'][' extends']) && ! (isset($definition['override_parent']) && $definition['override_parent'] == true)) {382 if (isset($definition['inheritance']['type']) && $definition['inheritance']['type'] == 'concrete') { 371 383 $ret[$i] = " parent::setUp();"; 372 384 $i++; … … 428 440 $i++; 429 441 } 430 }431 432 if (isset($definition['inheritance']['keyField']) && isset($definition['inheritance']['keyValue'])) {433 $i++;434 $ret[$i] = " ".'$this->setInheritanceMap(array(\''.$definition['inheritance']['keyField'].'\' => \''.$definition['inheritance']['keyValue'].'\'));';435 442 } 436 443