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