/** * Filter the query by a related \ECP\GroupPerson object * * @param \ECP\GroupPerson|ObjectCollection $groupPerson the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildGroupPersonTypeQuery The current query, for fluid interface */ public function filterByGroupPerson($groupPerson, $comparison = null) { if ($groupPerson instanceof \ECP\GroupPerson) { return $this->addUsingAlias(GroupPersonTypeTableMap::COL_ID, $groupPerson->getGrouppersontypeid(), $comparison); } elseif ($groupPerson instanceof ObjectCollection) { return $this->useGroupPersonQuery()->filterByPrimaryKeys($groupPerson->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByGroupPerson() only accepts arguments of type \\ECP\\GroupPerson or Collection'); } }