/** * 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 UserQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByPageRelatedByCreatedBy($page, $comparison = null) { if ($page instanceof Page) { return $this->addUsingAlias(UserPeer::ID, $page->getCreatedBy(), $comparison); } elseif ($page instanceof PropelObjectCollection) { return $this->usePageRelatedByCreatedByQuery()->filterByPrimaryKeys($page->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPageRelatedByCreatedBy() only accepts arguments of type Page or PropelCollection'); } }