Development

Changeset 8502

You must first sign up to be able to contribute.

Changeset 8502

Show
Ignore:
Timestamp:
04/17/08 09:38:10 (6 months ago)
Author:
francois
Message:

sfPropelFinderPlugin Fixed problem in a particular join case (patch from jug - closes 3338)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelFinderPlugin/README

    r8398 r8502  
    296296== Changelog == 
    297297 
    298 === 2008-04-10 | Trunk === 
    299  
     298=== 2008-04-17 | Trunk === 
     299 
     300 * jug: Fixed problem in a particular join case 
    300301 * francois: Added `sfPropelFinder::with()` method (based on `sfPropelObjectPeerImpersonator::populateObjects()` code by hartym) 
    301302 * francois: Added support for magic `andXXX()` and `orXXX()` methods. 
  • plugins/sfPropelFinderPlugin/lib/sfPropelFinder.php

    r8396 r8502  
    551551      if($relation = $this->findRelation(str_replace('Peer', '', $peerClass), $phpName.'Peer')) 
    552552      { 
    553         return $relation
     553        return array_reverse($relation)
    554554      } 
    555555    } 
  • plugins/sfPropelFinderPlugin/test/unit/sfPropelFinderTest.php

    r8396 r8502  
    425425$t->is($column2, CategoryPeer::ID, 'getRelation() guesses the two parts of a relation properly for many-to-one relationships'); 
    426426list($column1, $column2) = sfPropelFinder::from('Article')->getRelation('Comment'); 
    427 $t->is($column1, CommentPeer::ARTICLE_ID, 'getRelation() guesses the two parts of a relation properly for one-to-many relationships'); 
    428 $t->is($column2, ArticlePeer::ID, 'getRelation() guesses the two parts of a relation properly for one-to-many relationships'); 
     427$t->is($column1, ArticlePeer::ID, 'getRelation() guesses the two parts of a relation properly for one-to-many relationships'); 
     428$t->is($column2, CommentPeer::ARTICLE_ID, 'getRelation() guesses the two parts of a relation properly for one-to-many relationships'); 
    429429ArticlePeer::doDeleteAll(); 
    430430CategoryPeer::doDeleteAll();