Ejemplo n.º 1
0
 /**
  * Filter the query by a related \SpoilerWiki\Summary object
  *
  * @param \SpoilerWiki\Summary|ObjectCollection $summary the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildMilestoneQuery The current query, for fluid interface
  */
 public function filterBySummary($summary, $comparison = null)
 {
     if ($summary instanceof \SpoilerWiki\Summary) {
         return $this->addUsingAlias(MilestoneTableMap::COL_ID, $summary->getIntroducedAt(), $comparison);
     } elseif ($summary instanceof ObjectCollection) {
         return $this->useSummaryQuery()->filterByPrimaryKeys($summary->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBySummary() only accepts arguments of type \\SpoilerWiki\\Summary or Collection');
     }
 }