/**
  * Filter the query by a related Chart object
  *
  * @param   Chart|PropelObjectCollection $chart  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 filterByChart($chart, $comparison = null)
 {
     if ($chart instanceof Chart) {
         return $this->addUsingAlias(UserPeer::ID, $chart->getAuthorId(), $comparison);
     } elseif ($chart instanceof PropelObjectCollection) {
         return $this->useChartQuery()->filterByPrimaryKeys($chart->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByChart() only accepts arguments of type Chart or PropelCollection');
     }
 }
 /**
  * Filter the query by a related Book object
  *
  * @param   Book|PropelObjectCollection $book  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 AuthorQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByBook($book, $comparison = null)
 {
     if ($book instanceof Book) {
         return $this->addUsingAlias(AuthorPeer::ID, $book->getAuthorId(), $comparison);
     } elseif ($book instanceof PropelObjectCollection) {
         return $this->useBookQuery()->filterByPrimaryKeys($book->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBook() only accepts arguments of type Book or PropelCollection');
     }
 }