コード例 #1
0
ファイル: RigQuery.php プロジェクト: pcmasteratings/site
 /**
  * Filter the query by a related \RigAttributeValue object
  *
  * @param \RigAttributeValue|ObjectCollection $rigAttributeValue the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildRigQuery The current query, for fluid interface
  */
 public function filterByRigAttributeValue($rigAttributeValue, $comparison = null)
 {
     if ($rigAttributeValue instanceof \RigAttributeValue) {
         return $this->addUsingAlias(RigTableMap::COL_ID, $rigAttributeValue->getRigId(), $comparison);
     } elseif ($rigAttributeValue instanceof ObjectCollection) {
         return $this->useRigAttributeValueQuery()->filterByPrimaryKeys($rigAttributeValue->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRigAttributeValue() only accepts arguments of type \\RigAttributeValue or Collection');
     }
 }