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