/** * Filter the query by a related \Rigs object * * @param \Rigs|ObjectCollection $rigs 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 ChildRigAttributeValuesQuery The current query, for fluid interface */ public function filterByRigs($rigs, $comparison = null) { if ($rigs instanceof \Rigs) { return $this->addUsingAlias(RigAttributeValuesTableMap::COL_RIG_ID, $rigs->getId(), $comparison); } elseif ($rigs instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(RigAttributeValuesTableMap::COL_RIG_ID, $rigs->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByRigs() only accepts arguments of type \\Rigs or Collection'); } }