Changeset 4502
- Timestamp:
- 06/08/08 23:26:30 (13 months ago)
- Location:
- branches/0.11
- Files:
-
- 5 modified
-
lib/Doctrine/Import/Schema.php (modified) (1 diff)
-
lib/Doctrine/Relation.php (modified) (1 diff)
-
lib/Doctrine/Relation/Parser.php (modified) (1 diff)
-
manual/docs/en/relations.txt (modified) (1 diff)
-
tests/run.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/lib/Doctrine/Import/Schema.php
r4475 r4502 117 117 'onUpdate', 118 118 'equal', 119 'override',120 119 'owningSide'), 121 120 -
branches/0.11/lib/Doctrine/Relation.php
r4472 r4502 80 80 'cascade' => array(), // application-level cascades 81 81 'owningSide' => false, // whether this is the owning side 82 'override' => false // whether to override if relation exists already83 82 ); 84 83 -
branches/0.11/lib/Doctrine/Relation/Parser.php
r4472 r4502 136 136 } 137 137 138 if ($this->hasRelation($alias) && (! isset($options['override']) || ! $options['override'])) { 139 throw new Doctrine_Relation_Exception('A relationship with the name "' . $alias . '" already exists.'); 140 } 141 142 if (isset($this->relations[$alias])) { 143 unset($this->relations[$alias]); 144 } 145 146 if (isset($this->_pending[$alias])) { 147 unset($this->_pending[$alias]); 148 } 138 if ($this->hasRelation($alias)) { 139 unset($this->relations[$alias]); 140 unset($this->_pending[$alias]); 141 } 149 142 150 143 $this->_pending[$alias] = array_merge($options, array('class' => $name, 'alias' => $alias)); -
branches/0.11/manual/docs/en/relations.txt
r4472 r4502 14 14 * **onDelete**, (optional) the onDelete integrity action that is applied on the foreign key constraint when the tables are created by Doctrine. 15 15 * **onUpdate**, (optional) the onUpdate integrity action that is applied on the foreign key constraint when the tables are created by Doctrine. 16 * **override**, (optional) the override option will override the relation definition if one already exists with the same name. This is useful in cases where you have child classes using inheritance which redefine a relations information for the child class.17 16 18 17 So lets take our first example, say we have two classes Forum_Board and Forum_Thread. Here Forum_Board has many -
branches/0.11/tests/run.php
r4486 r4502 73 73 $tickets->addTestCase(new Doctrine_Ticket_1071_TestCase()); 74 74 $tickets->addTestCase(new Doctrine_Ticket_1072_TestCase()); 75 $tickets->addTestCase(new Doctrine_Ticket_1092_TestCase()); 75 76 $tickets->addTestCase(new Doctrine_Ticket_1099_TestCase()); 76 77 $tickets->addTestCase(new Doctrine_Ticket_1113_TestCase());