/** * Declares an association between this object and a ChildRigs object. * * @param ChildRigs $v * @return $this|\RigAttributeValues The current object (for fluent API support) * @throws PropelException */ public function setRigs(ChildRigs $v = null) { if ($v === null) { $this->setRigId(NULL); } else { $this->setRigId($v->getId()); } $this->aRigs = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildRigs object, it will not be re-added. if ($v !== null) { $v->addRigAttributeValues($this); } return $this; }
/** * 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'); } }
/** * Exclude object from result * * @param ChildRigs $rigs Object to remove from the list of results * * @return $this|ChildRigsQuery The current query, for fluid interface */ public function prune($rigs = null) { if ($rigs) { $this->addUsingAlias(RigsTableMap::COL_ID, $rigs->getId(), Criteria::NOT_EQUAL); } return $this; }