/** * Filter the query by a related \App\Models\Application object * * @param \App\Models\Application|ObjectCollection $application the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildSubjectQuery The current query, for fluid interface */ public function filterByApplication($application, $comparison = null) { if ($application instanceof \App\Models\Application) { return $this->addUsingAlias(SubjectTableMap::COL_ID, $application->getSubjectId(), $comparison); } elseif ($application instanceof ObjectCollection) { return $this->useApplicationQuery()->filterByPrimaryKeys($application->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByApplication() only accepts arguments of type \\App\\Models\\Application or Collection'); } }