Changeset 4472
- Timestamp:
- 06/06/08 16:30:01 (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
r4367 r4472 116 116 'onDelete', 117 117 'onUpdate', 118 'equal'), 118 'equal', 119 'override'), 119 120 120 121 'inheritance'=> array('type', -
branches/0.11/lib/Doctrine/Relation.php
r4319 r4472 79 79 'equal' => false, 80 80 'cascade' => array(), // application-level cascades 81 'owningSide' => false // whether this is the owning side 81 'owningSide' => false, // whether this is the owning side 82 'override' => false // whether to override if relation exists already 82 83 ); 83 84 -
branches/0.11/lib/Doctrine/Relation/Parser.php
r4387 r4472 136 136 } 137 137 138 if ($this->hasRelation($alias) ) {138 if ($this->hasRelation($alias) && (! isset($options['override']) || ! $options['override'])) { 139 139 throw new Doctrine_Relation_Exception('A relationship with the name "' . $alias . '" already exists.'); 140 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 } 141 149 142 150 $this->_pending[$alias] = array_merge($options, array('class' => $name, 'alias' => $alias)); -
branches/0.11/manual/docs/en/relations.txt
r4319 r4472 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. 16 17 17 18 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
r4460 r4472 73 73 $tickets->addTestCase(new Doctrine_Ticket_1028_TestCase()); 74 74 $tickets->addTestCase(new Doctrine_Ticket_1071_TestCase()); 75 $tickets->addTestCase(new Doctrine_Ticket_1044_TestCase()); 75 76 $test->addTestCase($tickets); 76 77