/** * Filter the query by a related ContentObject object * * @param ContentObject|PropelObjectCollection $contentObject 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 filterByContentObjectRelatedByCreatedBy($contentObject, $comparison = null) { if ($contentObject instanceof ContentObject) { return $this->addUsingAlias(UserPeer::ID, $contentObject->getCreatedBy(), $comparison); } elseif ($contentObject instanceof PropelObjectCollection) { return $this->useContentObjectRelatedByCreatedByQuery()->filterByPrimaryKeys($contentObject->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByContentObjectRelatedByCreatedBy() only accepts arguments of type ContentObject or PropelCollection'); } }