/**
  * Filter the query by a related \WineTasting\Model\Wine object
  *
  * @param \WineTasting\Model\Wine|ObjectCollection $wine The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildTastedWineQuery The current query, for fluid interface
  */
 public function filterByWine($wine, $comparison = null)
 {
     if ($wine instanceof \WineTasting\Model\Wine) {
         return $this->addUsingAlias(TastedWineTableMap::COL_IDWINE, $wine->getIdWine(), $comparison);
     } elseif ($wine instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TastedWineTableMap::COL_IDWINE, $wine->toKeyValue('PrimaryKey', 'IdWine'), $comparison);
     } else {
         throw new PropelException('filterByWine() only accepts arguments of type \\WineTasting\\Model\\Wine or Collection');
     }
 }