Changeset 10664
- Timestamp:
- 08/05/08 14:54:54 (4 months ago)
- Files:
-
- plugins/sfPropelFinderPlugin/README (modified) (1 diff)
- plugins/sfPropelFinderPlugin/lib/sfPropelFinder.php (modified) (1 diff)
- plugins/sfPropelFinderPlugin/test/unit/sfPropelFinderPagerTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPropelFinderPlugin/README
r10655 r10664 612 612 == Changelog == 613 613 614 === 2008-08-04 | Trunk === 615 614 === 2008-08-05 | Trunk === 615 616 * mrhyde: Fixed issue when calling several termination methods on a finder 616 617 * francois: Implemented `sfDoctrineFinder::count()` 617 618 * francois: [BC Break] Replaced `sfPropelFinder::setPeerClass()` by `sfPropelFinder::setClass()` (will break classes extending sfPropelFinder) plugins/sfPropelFinderPlugin/lib/sfPropelFinder.php
r10655 r10664 798 798 $criteria = clone $this->criteria; 799 799 $criterions = $this->criterions; 800 800 // Clone criterions to avoid repetition of conditions in a finder with several executions (like in a pager) 801 foreach ($criterions as &$criterion) 802 { 803 $criterion = clone $criterion; 804 } 805 801 806 while ($criterion = array_pop($criterions)) 802 807 { plugins/sfPropelFinderPlugin/test/unit/sfPropelFinderPagerTest.php
r10655 r10664 51 51 ArticlePeer::doDeleteAll(); 52 52 53 $t = new lime_test(3 0, new lime_output_color());53 $t = new lime_test(31, new lime_output_color()); 54 54 55 55 $article1 = new Article(); … … 152 152 $t->fail('Children of sfPropelFinder can use paginate()'); 153 153 } 154 155 $t->diag('sfPropelFinderPager issues with repeated criterions'); 156 157 $finder = sfPropelFinder::from('Article')-> 158 where('Title', 'foo')-> 159 where('CategoryId', 1); 160 $pager = $finder->paginate(2, 1); 161 $results = $pager->getResults(); 162 $t->is( 163 $finder->getLatestQuery(), 164 "SELECT article.ID, article.TITLE, article.CATEGORY_ID FROM article WHERE (article.TITLE='foo' AND article.CATEGORY_ID=1) LIMIT 1", 165 'getResults() does not repeat conditions' 166 );