/** * Declares an association between this object and a ChildTask object. * * @param ChildTask $v * @return $this|\Bill The current object (for fluent API support) * @throws PropelException */ public function setTask(ChildTask $v = null) { if ($v === null) { $this->setTaskId(NULL); } else { $this->setTaskId($v->getId()); } $this->aTask = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildTask object, it will not be re-added. if ($v !== null) { $v->addBill($this); } return $this; }
/** * Exclude object from result * * @param ChildTask $task Object to remove from the list of results * * @return $this|ChildTaskQuery The current query, for fluid interface */ public function prune($task = null) { if ($task) { $this->addUsingAlias(TaskTableMap::COL_ID, $task->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Task object * * @param \Task|ObjectCollection $task 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 ChildBillQuery The current query, for fluid interface */ public function filterByTask($task, $comparison = null) { if ($task instanceof \Task) { return $this->addUsingAlias(BillTableMap::COL_TASK_ID, $task->getId(), $comparison); } elseif ($task instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(BillTableMap::COL_TASK_ID, $task->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByTask() only accepts arguments of type \\Task or Collection'); } }