示例#1
0
 /**
  * Filter the query by a related \Task object
  *
  * @param \Task|ObjectCollection $task the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildProjectQuery The current query, for fluid interface
  */
 public function filterByTask($task, $comparison = null)
 {
     if ($task instanceof \Task) {
         return $this->addUsingAlias(ProjectTableMap::COL_ID, $task->getProjectId(), $comparison);
     } elseif ($task instanceof ObjectCollection) {
         return $this->useTaskQuery()->filterByPrimaryKeys($task->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByTask() only accepts arguments of type \\Task or Collection');
     }
 }