Outer Join using Propel 1.2?

I am trying to do Outer Join in Symfony. Here's a bit of code that seems to work if the criteria are supported by OUTER_JOIN:

$user = sfContext::getInstance()->getUser();
$petCriteria = new Criteria();
$petCriteria->add(PetInfoPeer::ACCOUNT_ID, $user->getProfile()->getAccountId());
$petCriteria->add(LostPetPeer::PET_INFO_ID, Criteria::ISNULL);
$petCriteria->addJoin(LostPetPeer::PET_INFO_ID, PetInfoPeer::PET_INFO_ID, Criteria::OUTER_JOIN);

      

Am I missing something? Does Propel 1.3 support this? I've searched everywhere and only found pseudocode.

0


source to share


1 answer


I don't think this is possible using criteria. You will have to write and run SQL and then create the models yourself.



Here's a good example of this found on this site.

+1


source







All Articles