Exemple #1
0
 /**
  * Filter the query by a related \Employee object
  *
  * @param \Employee|ObjectCollection $employee 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 filterByEmployee($employee, $comparison = null)
 {
     if ($employee instanceof \Employee) {
         return $this->addUsingAlias(TaskTableMap::COL_EMPLOYEE_ID, $employee->getId(), $comparison);
     } elseif ($employee instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TaskTableMap::COL_EMPLOYEE_ID, $employee->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByEmployee() only accepts arguments of type \\Employee or Collection');
     }
 }