/** * Filter the query by a related \App\Models\Application object * * @param \App\Models\Application|ObjectCollection $application 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 ChildApplicationRequestQuery The current query, for fluid interface */ public function filterByApplication($application, $comparison = null) { if ($application instanceof \App\Models\Application) { return $this->addUsingAlias(ApplicationRequestTableMap::COL_APPLICATION_ID, $application->getId(), $comparison); } elseif ($application instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ApplicationRequestTableMap::COL_APPLICATION_ID, $application->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByApplication() only accepts arguments of type \\App\\Models\\Application or Collection'); } }