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