Exemplo n.º 1
0
 /**
  * Filter the query by a related Cotisation object
  *
  * @param   Cotisation|PropelObjectCollection $cotisation  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   PersonneQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterByCotisation($cotisation, $comparison = null)
 {
     if ($cotisation instanceof Cotisation) {
         return $this->addUsingAlias(PersonnePeer::ID, $cotisation->getPersonneId(), $comparison);
     } elseif ($cotisation instanceof PropelObjectCollection) {
         return $this->useCotisationQuery()->filterByPrimaryKeys($cotisation->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCotisation() only accepts arguments of type Cotisation or PropelCollection');
     }
 }