Example #1
0
 /**
  * Filter the query by a related Page object
  *
  * @param   Page|PropelObjectCollection $page  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 PageQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByPageRelatedById($page, $comparison = null)
 {
     if ($page instanceof Page) {
         return $this->addUsingAlias(PagePeer::ID, $page->getCanonicalId(), $comparison);
     } elseif ($page instanceof PropelObjectCollection) {
         return $this->usePageRelatedByIdQuery()->filterByPrimaryKeys($page->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByPageRelatedById() only accepts arguments of type Page or PropelCollection');
     }
 }