Changeset 5027
- Timestamp:
- 10/02/08 02:51:45 (3 months ago)
- Location:
- branches/1.1
- Files:
-
- 1 added
- 6 modified
-
lib/Doctrine.php (modified) (1 diff)
-
lib/Doctrine/Configurable.php (modified) (2 diffs)
-
lib/Doctrine/Connection.php (modified) (1 diff)
-
lib/Doctrine/Table.php (modified) (1 diff)
-
tests/run.php (modified) (1 diff)
-
tests/Ticket/1307TestCase.php (added)
-
UPGRADE_TO_1_1 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/lib/Doctrine.php
r5018 r5027 198 198 const ATTR_AUTO_ACCESSOR_OVERRIDE = 165; 199 199 const ATTR_AUTO_FREE_QUERY_OBJECTS = 166; 200 const ATTR_DEFAULT_TABLE_CHARSET = 167; 201 const ATTR_DEFAULT_TABLE_COLLATE = 168; 200 202 201 203 /** -
branches/1.1/lib/Doctrine/Configurable.php
r5018 r5027 184 184 case Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE; 185 185 case Doctrine::ATTR_AUTO_FREE_QUERY_OBJECTS; 186 case Doctrine::ATTR_DEFAULT_TABLE_CHARSET; 187 case Doctrine::ATTR_DEFAULT_TABLE_COLLATE; 186 188 187 189 break; … … 462 464 463 465 /** 466 * Set the charset 467 * 468 * @param string $charset 469 */ 470 public function setCharset($charset) 471 { 472 $this->setAttribute(Doctrine::ATTR_DEFAULT_TABLE_CHARSET, $charset); 473 } 474 475 /** 476 * Get the charset 477 * 478 * @return mixed 479 */ 480 public function getCharset() 481 { 482 return $this->getAttribute(Doctrine::ATTR_DEFAULT_TABLE_CHARSET); 483 } 484 485 /** 486 * Set the collate 487 * 488 * @param string $collate 489 */ 490 public function setCollate($collate) 491 { 492 $this->setAttribute(Doctrine::ATTR_DEFAULT_TABLE_COLLATE, $collate); 493 } 494 495 /** 496 * Get the collate 497 * 498 * @return mixed $collate 499 */ 500 public function getCollate() 501 { 502 return $this->getAttribute(Doctrine::ATTR_DEFAULT_TABLE_COLLATE); 503 } 504 505 /** 464 506 * sets a parent for this configurable component 465 507 * the parent must be configurable component itself -
branches/1.1/lib/Doctrine/Connection.php
r5020 r5027 675 675 676 676 /** 677 * Set the charset on the current connection678 *679 * @param string charset680 */681 public function setCharset($charset)682 {683 684 }685 686 /**687 677 * Quote a string so it can be safely used as a table or column name 688 678 * -
branches/1.1/lib/Doctrine/Table.php
r4957 r5027 243 243 $this->_filters[] = new Doctrine_Record_Filter_Standard(); 244 244 $this->_repository = new Doctrine_Table_Repository($this); 245 245 246 if ($charset = $this->getAttribute(Doctrine::ATTR_DEFAULT_TABLE_CHARSET)) { 247 $this->_options['charset'] = $charset; 248 } 249 if ($collate = $this->getAttribute(Doctrine::ATTR_DEFAULT_TABLE_COLLATE)) { 250 $this->_options['collate'] = $collate; 251 } 252 246 253 $this->construct(); 247 254 } -
branches/1.1/tests/run.php
r5025 r5027 124 124 $tickets->addTestCase(new Doctrine_Ticket_1304_TestCase()); 125 125 $tickets->addTestCase(new Doctrine_Ticket_1305_TestCase()); 126 $tickets->addTestCase(new Doctrine_Ticket_1307_TestCase()); 126 127 $tickets->addTestCase(new Doctrine_Ticket_1315_TestCase()); 127 128 $tickets->addTestCase(new Doctrine_Ticket_1323_TestCase()); -
branches/1.1/UPGRADE_TO_1_1
r5021 r5027 21 21 $users = $q->execute(); // $q->free() is triggered 22 22 23 [r5019](http://trac.doctrine-project.org/changeset/5019) - `unlink()` and `link()` have been changed to not delete references until `save()` is called on the object 23 [r5019](http://trac.doctrine-project.org/changeset/5019) - `unlink()` and `link()` have been changed to not delete references until `save()` is called on the object. Also, fixed synchronizeWithArray() to synchronize many to many relationships. 24 24 25 25 // Does not link until save() … … 31 31 $user = Doctrine::getTable('User')->find(1); 32 32 $user->link('Groups', array(1, 2, 3), true); 33 34 $user = Doctrine::getTable('User')->find(1); 35 $userArray = array( 36 'Group' => array( 37 '_identifiers' => array( 38 1 => true, 39 2 => true, 40 3 => false) 41 )); 42 43 $user->synchronizeWithArray($userArray); 44 $user->save();