/** * Exclude object from result * * @param ChildWork $work Object to remove from the list of results * * @return $this|ChildWorkQuery The current query, for fluid interface */ public function prune($work = null) { if ($work) { $this->addUsingAlias(WorkTableMap::COL_ID, $work->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildWork object. * * @param ChildWork $v * @return $this|\SpoilerWiki\Milestone The current object (for fluent API support) * @throws PropelException */ public function setwork(ChildWork $v = null) { if ($v === null) { $this->setWorkId(NULL); } else { $this->setWorkId($v->getId()); } $this->awork = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildWork object, it will not be re-added. if ($v !== null) { $v->addMilestone($this); } return $this; }
/** * Filter the query by a related \SpoilerWiki\Work object * * @param \SpoilerWiki\Work|ObjectCollection $work 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 ChildMilestoneQuery The current query, for fluid interface */ public function filterBywork($work, $comparison = null) { if ($work instanceof \SpoilerWiki\Work) { return $this->addUsingAlias(MilestoneTableMap::COL_WORK_ID, $work->getId(), $comparison); } elseif ($work instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(MilestoneTableMap::COL_WORK_ID, $work->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterBywork() only accepts arguments of type \\SpoilerWiki\\Work or Collection'); } }