Example #1
0
 /**
  * Filter the query by a related Causadiferido object
  *
  * @param   Causadiferido|PropelObjectCollection $causadiferido The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   AgendaQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterByCausadiferido($causadiferido, $comparison = null)
 {
     if ($causadiferido instanceof Causadiferido) {
         return $this->addUsingAlias(AgendaPeer::CAUSA_DIFERIDO_ID, $causadiferido->getId(), $comparison);
     } elseif ($causadiferido instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(AgendaPeer::CAUSA_DIFERIDO_ID, $causadiferido->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCausadiferido() only accepts arguments of type Causadiferido or PropelCollection');
     }
 }