Ejemplo n.º 1
0
 /**
  * Filter the query by a related \SpoilerWiki\Summary object
  *
  * @param \SpoilerWiki\Summary|ObjectCollection $summary 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 ChildContentAreaQuery The current query, for fluid interface
  */
 public function filterBySummary($summary, $comparison = null)
 {
     if ($summary instanceof \SpoilerWiki\Summary) {
         return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $summary->getId(), $comparison);
     } elseif ($summary instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ContentAreaTableMap::COL_ID, $summary->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySummary() only accepts arguments of type \\SpoilerWiki\\Summary or Collection');
     }
 }