/** * Exclude object from result * * @param ChildWorkType $workType Object to remove from the list of results * * @return $this|ChildWorkTypeQuery The current query, for fluid interface */ public function prune($workType = null) { if ($workType) { $this->addUsingAlias(WorkTypeTableMap::COL_ID, $workType->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildWorkType object. * * @param ChildWorkType $v * @return $this|\SpoilerWiki\Canon The current object (for fluent API support) * @throws PropelException */ public function setworkType(ChildWorkType $v = null) { if ($v === null) { $this->setWorkTypeId(NULL); } else { $this->setWorkTypeId($v->getId()); } $this->aworkType = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildWorkType object, it will not be re-added. if ($v !== null) { $v->addCanon($this); } return $this; }
/** * Filter the query by a related \SpoilerWiki\WorkType object * * @param \SpoilerWiki\WorkType|ObjectCollection $workType 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 ChildCanonQuery The current query, for fluid interface */ public function filterByworkType($workType, $comparison = null) { if ($workType instanceof \SpoilerWiki\WorkType) { return $this->addUsingAlias(CanonTableMap::COL_WORK_TYPE_ID, $workType->getId(), $comparison); } elseif ($workType instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CanonTableMap::COL_WORK_TYPE_ID, $workType->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByworkType() only accepts arguments of type \\SpoilerWiki\\WorkType or Collection'); } }