/** * Filter the query by a related Page object * * @param Page|PropelObjectCollection $page The related object(s) 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 filterByPageRelatedByCanonicalId($page, $comparison = null) { if ($page instanceof Page) { return $this->addUsingAlias(PagePeer::CANONICAL_ID, $page->getId(), $comparison); } elseif ($page instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(PagePeer::CANONICAL_ID, $page->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByPageRelatedByCanonicalId() only accepts arguments of type Page or PropelCollection'); } }