コード例 #1
0
ファイル: BaseUserQuery.php プロジェクト: dapepe/tymio
 /**
  * Filter the query by a related Clocking object
  *
  * @param   Clocking|PropelObjectCollection $clocking  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 UserQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByClockingRelatedByUserId($clocking, $comparison = null)
 {
     if ($clocking instanceof Clocking) {
         return $this->addUsingAlias(UserPeer::ID, $clocking->getUserId(), $comparison);
     } elseif ($clocking instanceof PropelObjectCollection) {
         return $this->useClockingRelatedByUserIdQuery()->filterByPrimaryKeys($clocking->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByClockingRelatedByUserId() only accepts arguments of type Clocking or PropelCollection');
     }
 }