Example #1
0
 /**
  * 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    sfGuardUserQuery The current query, for fluid interface
  */
 public function filterByFile($file, $comparison = null)
 {
     if ($file instanceof File) {
         return $this->addUsingAlias(sfGuardUserPeer::ID, $file->getLastChangeCommitUser(), $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');
     }
 }