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