Changeset 4586
- Timestamp:
- 06/28/08 08:13:34 (12 months ago)
- Files:
-
- 1 modified
-
branches/0.11/lib/Doctrine/Relation/Parser.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Relation/Parser.php
r4502 r4586 198 198 if (isset($def['localKey'])) { 199 199 $rel = new Doctrine_Relation_LocalKey($def); 200 201 // Automatically index foreign keys which are not primary 202 $foreign = (array) $def['foreign']; 203 foreach ($foreign as $fk) { 204 if ( ! $rel->getTable()->isIdentifier($fk)) { 205 $rel->getTable()->addIndex($fk, array('fields' => array($fk))); 206 } 207 } 200 208 } else { 201 209 $rel = new Doctrine_Relation_ForeignKey($def);