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