Changeset 4779 for branches/1.0
- Timestamp:
- 08/19/08 02:44:07 (5 months ago)
- Location:
- branches/1.0
- Files:
-
- 3 modified
-
lib/Doctrine/Export.php (modified) (2 diffs)
-
lib/Doctrine/Export/Mssql.php (modified) (1 diff)
-
tests/Query/JoinConditionTestCase.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/lib/Doctrine/Export.php
r4778 r4779 716 716 ' ' . $this->getCollationFieldDeclaration($field['collation']) : ''; 717 717 718 $notnull = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : '';718 $notnull = $this->getNotNullFieldDeclaration($field); 719 719 720 720 $unique = (isset($field['unique']) && $field['unique']) ? … … 774 774 return $default; 775 775 } 776 777 778 /** 779 * getDefaultDeclaration 780 * Obtain DBMS specific SQL code portion needed to set a NOT NULL 781 * declaration to be used in statements like CREATE TABLE. 782 * 783 * @param array $field field definition array 784 * @return string DBMS specific SQL code portion needed to set a default value 785 */ 786 public function getNotNullFieldDeclaration(array $definition) 787 { 788 return (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ''; 789 } 790 776 791 777 792 /** -
branches/1.0/lib/Doctrine/Export/Mssql.php
r4775 r4779 254 254 return 'DROP TABLE ' . $sequenceName; 255 255 } 256 257 258 /** 259 * getDefaultDeclaration 260 * Obtain DBMS specific SQL code portion needed to set a NOT NULL 261 * declaration to be used in statements like CREATE TABLE. 262 * 263 * @param array $field field definition array 264 * @return string DBMS specific SQL code portion needed to set a default value 265 */ 266 public function getNotNullFieldDeclaration(array $definition) 267 { 268 return (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ' NULL'; 269 } 256 270 } -
branches/1.0/tests/Query/JoinConditionTestCase.php
r4777 r4779 39 39 { } 40 40 41 /*public function testJoinConditionsAreSupportedForOneToManyLeftJoins()41 public function testJoinConditionsAreSupportedForOneToManyLeftJoins() 42 42 { 43 43 $q = new Doctrine_Query(); … … 82 82 83 83 $this->assertEqual($q->getQuery(), "SELECT e.id AS e__id, e.name AS e__name, p.id AS p__id FROM entity e LEFT JOIN phonenumber p ON e.name = p.phonenumber WHERE (e.type = 0)"); 84 } */85 84 } 85 86 86 public function testJoinWithConditionAndNotInClause() 87 87 {