/** * Filter the query by a related \App\Propel\File object * * @param \App\Propel\File|ObjectCollection $file the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildFileTypeQuery The current query, for fluid interface */ public function filterByFile($file, $comparison = null) { if ($file instanceof \App\Propel\File) { return $this->addUsingAlias(FileTypeTableMap::COL_FILE_TYPE_ID, $file->getFileTypeId(), $comparison); } elseif ($file instanceof ObjectCollection) { return $this->useFileQuery()->filterByPrimaryKeys($file->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByFile() only accepts arguments of type \\App\\Propel\\File or Collection'); } }