Example #1
0
 /**
  * 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');
     }
 }