Changeset 10592
- Timestamp:
- 08/01/08 18:02:07 (4 months ago)
- Files:
-
- plugins/sfPropelFinderPlugin/README (modified) (1 diff)
- plugins/sfPropelFinderPlugin/README_generator (added)
- plugins/sfPropelFinderPlugin/data (added)
- plugins/sfPropelFinderPlugin/data/generator (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/actions (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/actions/actions.class.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/config (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/config/generator.yml (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/templates (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/templates/.sf (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/validate (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/skeleton/validate/.sf (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/actions (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/actions/actions.class.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_edit_actions.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_edit_footer.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_edit_form.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_edit_header.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_edit_messages.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_filters.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_actions.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_footer.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_header.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_messages.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_td_actions.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_td_stacked.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_td_tabular.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_th_stacked.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/_list_th_tabular.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/editSuccess.php (added)
- plugins/sfPropelFinderPlugin/data/generator/DbFinderAdmin/default/template/templates/listSuccess.php (added)
- plugins/sfPropelFinderPlugin/lib/generator (added)
- plugins/sfPropelFinderPlugin/lib/generator/DbFinderAdminGenerator.class.php (added)
- plugins/sfPropelFinderPlugin/lib/sfPropelFinder.php (modified) (1 diff)
- plugins/sfPropelFinderPlugin/test/unit/sfPropelFinderRelationsTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPropelFinderPlugin/README
r10549 r10592 611 611 == Changelog == 612 612 613 === 2008-07-31 | Trunk === 614 613 === 2008-08-01 | Trunk === 614 615 * francois: Added `DbFinderAdminGenerator` (WIP) 615 616 * francois: Fixed problem with `join()` and `with()` when called by children of `sfPropelPager` 616 617 * windock: Fixed problem with `paginate()` when called by children of `sfPropelPager` plugins/sfPropelFinderPlugin/lib/sfPropelFinder.php
r10549 r10592 449 449 { 450 450 $startCol = $withObj->hydrate($row, $startCol); 451 } 452 453 // As we can be in a left join, there is a possibility that the hydrated related object is null 454 // In this case, we must not relate it to the main object 455 $isEmpty = true; 456 foreach ($withObj->toArray() as $value) 457 { 458 if($value !== null) 459 { 460 $isEmpty = false; 461 } 462 } 463 if($isEmpty) 464 { 465 break; 451 466 } 452 467 plugins/sfPropelFinderPlugin/test/unit/sfPropelFinderRelationsTest.php
r10549 r10592 79 79 $con = Propel::getConnection(); 80 80 81 $t = new lime_test(8 1, new lime_output_color());81 $t = new lime_test(82, new lime_output_color()); 82 82 83 83 $t->diag('findRelation()'); … … 495 495 } 496 496 497 $t->diag('sfPropelFinder::with() and left joins'); 498 499 ArticlePeer::doDeleteAll(); 500 CategoryPeer::doDeleteAll(); 501 502 $category1 = new Category(); 503 $category1->setName('cat1'); 504 $category1->save(); 505 $article1 = new Article(); 506 $article1->setTitle('aaa'); 507 $article1->setCategory($category1); 508 $article1->save(); 509 $article2 = new Article(); 510 $article2->setTitle('bbb'); 511 $article2->save(); 512 513 $article = sfPropelFinder::from('Article')->leftJoin('Category')->with('Category')->findLast(); 514 $t->isa_ok($article->getCategory(), 'NULL', 'In a left join using with(), empty related objects are not hydrated');