예제 #1
0
 /**
  * Filter the query by a related \iuf\junia\model\Event object
  *
  * @param \iuf\junia\model\Event|ObjectCollection $event The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildStartgroupQuery The current query, for fluid interface
  */
 public function filterByEvent($event, $comparison = null)
 {
     if ($event instanceof \iuf\junia\model\Event) {
         return $this->addUsingAlias(StartgroupTableMap::COL_EVENT_ID, $event->getId(), $comparison);
     } elseif ($event instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(StartgroupTableMap::COL_EVENT_ID, $event->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByEvent() only accepts arguments of type \\iuf\\junia\\model\\Event or Collection');
     }
 }