예제 #1
0
 /**
  * Filter the query by a related Backup object
  *
  * @param   Backup|PropelObjectCollection $backup  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 SiteQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByBackup($backup, $comparison = null)
 {
     if ($backup instanceof Backup) {
         return $this->addUsingAlias(SitePeer::ID, $backup->getSiteid(), $comparison);
     } elseif ($backup instanceof PropelObjectCollection) {
         return $this->useBackupQuery()->filterByPrimaryKeys($backup->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBackup() only accepts arguments of type Backup or PropelCollection');
     }
 }