/** * Exclude object from result * * @param ChildProfessor $professor Object to remove from the list of results * * @return $this|ChildProfessorQuery The current query, for fluid interface */ public function prune($professor = null) { if ($professor) { $this->addUsingAlias(ProfessorTableMap::COL_ID, $professor->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \App\Models\Professor object * * @param \App\Models\Professor|ObjectCollection $professor 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 ChildEngagementQuery The current query, for fluid interface */ public function filterByProfessor($professor, $comparison = null) { if ($professor instanceof \App\Models\Professor) { return $this->addUsingAlias(EngagementTableMap::COL_PROFESSOR_ID, $professor->getId(), $comparison); } elseif ($professor instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(EngagementTableMap::COL_PROFESSOR_ID, $professor->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByProfessor() only accepts arguments of type \\App\\Models\\Professor or Collection'); } }
/** * Declares an association between this object and a ChildProfessor object. * * @param ChildProfessor $v * @return $this|\App\Models\AdminUser The current object (for fluent API support) * @throws PropelException */ public function setProfessor(ChildProfessor $v = null) { if ($v === null) { $this->setProfessorId(NULL); } else { $this->setProfessorId($v->getId()); } $this->aProfessor = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildProfessor object, it will not be re-added. if ($v !== null) { $v->addAdminUser($this); } return $this; }