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