Exemple #1
0
 /**
  * Filter the query by a related \Models\Article object
  *
  * @param \Models\Article|ObjectCollection $article 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 filterByArticle($article, $comparison = null)
 {
     if ($article instanceof \Models\Article) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $article->getIdUser(), $comparison);
     } elseif ($article instanceof ObjectCollection) {
         return $this->useArticleQuery()->filterByPrimaryKeys($article->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByArticle() only accepts arguments of type \\Models\\Article or Collection');
     }
 }