Changeset 4826
- Timestamp:
- 08/27/08 02:47:26 (5 months ago)
- Location:
- branches/1.0/lib/Doctrine
- Files:
-
- 2 modified
-
Connection/UnitOfWork.php (modified) (1 diff)
-
Record.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/lib/Doctrine/Connection/UnitOfWork.php
r4720 r4826 49 49 public function saveGraph(Doctrine_Record $record) 50 50 { 51 $record->assignInheritanceValues(); 52 51 53 $conn = $this->getConnection(); 52 54 -
branches/1.0/lib/Doctrine/Record.php
r4819 r4826 447 447 } else { 448 448 return $this->getErrorStack(); 449 } 450 } 451 452 /** 453 * Assign the inheritance column values 454 * 455 * @return void 456 */ 457 public function assignInheritanceValues() 458 { 459 $map = $this->_table->inheritanceMap; 460 foreach ($map as $k => $v) { 461 $k = $this->_table->getFieldName($k); 462 $old = $this->get($k, false); 463 464 if ((string) $old !== (string) $v || $old === null) { 465 $this->set($k, $v); 466 } 449 467 } 450 468 } … … 1290 1308 } 1291 1309 } 1292 $map = $this->_table->inheritanceMap;1293 foreach ($map as $k => $v) {1294 $k = $this->_table->getFieldName($k);1295 $old = $this->get($k, false);1296 1297 if ((string) $old !== (string) $v || $old === null) {1298 $a[$k] = $v;1299 $this->_data[$k] = $v;1300 }1301 }1302 1310 1303 1311 return $a;