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