Author: jwage
Date: 2008-09-08 21:12:00 +0100 (Mon, 08 Sep 2008)
New Revision: 4890

Modified:
   branches/1.0/lib/Doctrine/Import/Schema.php
   branches/1.0/lib/Doctrine/Relation.php
   branches/1.0/lib/Doctrine/Relation/Nest.php
   branches/1.0/lib/Doctrine/Relation/Parser.php
   branches/1.0/tests/Ticket/1323TestCase.php
   branches/1.0/tests/Ticket/1323b2TestCase.php
Log:
fixes #1323 Renaming to refClassRelationAlias and adding support to yaml


Modified: branches/1.0/lib/Doctrine/Import/Schema.php
===================================================================
--- branches/1.0/lib/Doctrine/Import/Schema.php 2008-09-08 19:48:10 UTC (rev 
4889)
+++ branches/1.0/lib/Doctrine/Import/Schema.php 2008-09-08 20:12:00 UTC (rev 
4890)
@@ -120,7 +120,8 @@
                                                           'onDelete',
                                                           'onUpdate',
                                                           'equal',
-                                                          'owningSide'),
+                                                          'owningSide',
+                                                          
'refClassRelationAlias'),
 
                                    'inheritance'=>  array('type',
                                                           'extends',

Modified: branches/1.0/lib/Doctrine/Relation/Nest.php
===================================================================
--- branches/1.0/lib/Doctrine/Relation/Nest.php 2008-09-08 19:48:10 UTC (rev 
4889)
+++ branches/1.0/lib/Doctrine/Relation/Nest.php 2008-09-08 20:12:00 UTC (rev 
4890)
@@ -111,8 +111,8 @@
             $q->addComponent($tableName,  
$record->getTable()->getComponentName());
             
             $path = $record->getTable()->getComponentName(). '.' . 
$this->getAssociationFactory()->getComponentName();
-            if ($this->definition['refClassRelation']) {
-                $path = $record->getTable()->getComponentName(). '.' . 
$this->definition['refClassRelation'];
+            if ($this->definition['refClassRelationAlias']) {
+                $path = $record->getTable()->getComponentName(). '.' . 
$this->definition['refClassRelationAlias'];
             }
             $q->addComponent($assocTable, $path);
 

Modified: branches/1.0/lib/Doctrine/Relation/Parser.php
===================================================================
--- branches/1.0/lib/Doctrine/Relation/Parser.php       2008-09-08 19:48:10 UTC 
(rev 4889)
+++ branches/1.0/lib/Doctrine/Relation/Parser.php       2008-09-08 20:12:00 UTC 
(rev 4890)
@@ -167,8 +167,8 @@
                 $def = $this->completeAssocDefinition($def);
                 $localClasses = 
array_merge($this->_table->getOption('parents'), 
array($this->_table->getComponentName()));
                 
-                $backRefRelationName = isset($def['refClassRelation']) ?
-                        $def['refClassRelation'] : $def['refClass'];
+                $backRefRelationName = isset($def['refClassRelationAlias']) ?
+                        $def['refClassRelationAlias'] : $def['refClass'];
                 if ( ! isset($this->_pending[$backRefRelationName]) && ! 
isset($this->_relations[$backRefRelationName])) {
 
                     $parser = $def['refTable']->getRelationParser();

Modified: branches/1.0/lib/Doctrine/Relation.php
===================================================================
--- branches/1.0/lib/Doctrine/Relation.php      2008-09-08 19:48:10 UTC (rev 
4889)
+++ branches/1.0/lib/Doctrine/Relation.php      2008-09-08 20:12:00 UTC (rev 
4890)
@@ -66,7 +66,7 @@
                                   'equal'       => false,
                                   'cascade'     => array(), // 
application-level cascades
                                   'owningSide'  => false, // whether this is 
the owning side
-                                  'refClassRelation' => null,
+                                  'refClassRelationAlias' => null,
                                   );
 
     /**

Modified: branches/1.0/tests/Ticket/1323TestCase.php
===================================================================
--- branches/1.0/tests/Ticket/1323TestCase.php  2008-09-08 19:48:10 UTC (rev 
4889)
+++ branches/1.0/tests/Ticket/1323TestCase.php  2008-09-08 20:12:00 UTC (rev 
4890)
@@ -161,13 +161,13 @@
         $this->hasMany('T1323User as Parents', array('local' => 'child_id',
                                                 'foreign'  => 'parent_id',
                                                 'refClass' => 
'T1323UserReference',
-                                                'refClassRelation' => 
'childLinks'
+                                                'refClassRelationAlias' => 
'childLinks'
                                                 ));
 
         $this->hasMany('T1323User as Children', array('local' => 'parent_id',
                                                  'foreign'  => 'child_id',
                                                  'refClass' => 
'T1323UserReference',
-                                                 'refClassRelation' => 
'parentLinks'
+                                                 'refClassRelationAlias' => 
'parentLinks'
                                                  ));
     }
     

Modified: branches/1.0/tests/Ticket/1323b2TestCase.php
===================================================================
--- branches/1.0/tests/Ticket/1323b2TestCase.php        2008-09-08 19:48:10 UTC 
(rev 4889)
+++ branches/1.0/tests/Ticket/1323b2TestCase.php        2008-09-08 20:12:00 UTC 
(rev 4890)
@@ -151,13 +151,13 @@
     $this->hasMany('Concept as broaderConcepts', array('refClass' => 
'ConceptRelation',
                                                        'local' => 'concept_id',
                                                        'foreign' => 
'parent_concept_id', 
-                                                       'refClassRelation' => 
'broaderLinks'));
+                                                       'refClassRelationAlias' 
=> 'broaderLinks'));
 
 
     $this->hasMany('Concept as narrowerConcepts', array('refClass' => 
'ConceptRelation',
                                                         'local' => 
'parent_concept_id',
                                                         'foreign' => 
'concept_id', 
-                                                        'refClassRelation' => 
'narrowerLinks'));
+                                                        
'refClassRelationAlias' => 'narrowerLinks'));
   }
 }
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to