/** * 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'); } }
/** * Declares an association between this object and a ChildEmployee object. * * @param ChildEmployee $v * @return $this|\Project The current object (for fluent API support) * @throws PropelException */ public function setEmployee(ChildEmployee $v = null) { if ($v === null) { $this->setEmployeeId(NULL); } else { $this->setEmployeeId($v->getId()); } $this->aEmployee = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildEmployee object, it will not be re-added. if ($v !== null) { $v->addProject($this); } return $this; }
/** * Exclude object from result * * @param ChildEmployee $employee Object to remove from the list of results * * @return $this|ChildEmployeeQuery The current query, for fluid interface */ public function prune($employee = null) { if ($employee) { $this->addUsingAlias(EmployeeTableMap::COL_ID, $employee->getId(), Criteria::NOT_EQUAL); } return $this; }