Exemplo n.º 1
0
 /**
  * Filter the query by a related \UserWeights object
  *
  * @param \UserWeights|ObjectCollection $userWeights 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 filterByUserWeights($userWeights, $comparison = null)
 {
     if ($userWeights instanceof \UserWeights) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $userWeights->getUserId(), $comparison);
     } elseif ($userWeights instanceof ObjectCollection) {
         return $this->useUserWeightsQuery()->filterByPrimaryKeys($userWeights->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByUserWeights() only accepts arguments of type \\UserWeights or Collection');
     }
 }