Esempio n. 1
0
 /**
  * Filter the query by a related \WineTasting\Model\Wine object
  *
  * @param \WineTasting\Model\Wine|ObjectCollection $wine 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 filterByWineRelatedBySubmitter($wine, $comparison = null)
 {
     if ($wine instanceof \WineTasting\Model\Wine) {
         return $this->addUsingAlias(UserTableMap::COL_IDUSER, $wine->getSubmitter(), $comparison);
     } elseif ($wine instanceof ObjectCollection) {
         return $this->useWineRelatedBySubmitterQuery()->filterByPrimaryKeys($wine->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByWineRelatedBySubmitter() only accepts arguments of type \\WineTasting\\Model\\Wine or Collection');
     }
 }