Esempio n. 1
0
 /**
  * Filter the query by a related \Models\Comment object
  *
  * @param \Models\Comment|ObjectCollection $comment the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserQuery The current query, for fluid interface
  */
 public function filterByComment($comment, $comparison = null)
 {
     if ($comment instanceof \Models\Comment) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $comment->getUserId(), $comparison);
     } elseif ($comment instanceof ObjectCollection) {
         return $this->useCommentQuery()->filterByPrimaryKeys($comment->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByComment() only accepts arguments of type \\Models\\Comment or Collection');
     }
 }