コード例 #1
0
 /**
  * Filter the query by a related Categoriagasto object
  *
  * @param   Categoriagasto|PropelObjectCollection $categoriagasto The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 GastofacturacionQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByCategoriagasto($categoriagasto, $comparison = null)
 {
     if ($categoriagasto instanceof Categoriagasto) {
         return $this->addUsingAlias(GastofacturacionPeer::IDCATEGORIAGASTO, $categoriagasto->getIdcategoriagasto(), $comparison);
     } elseif ($categoriagasto instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(GastofacturacionPeer::IDCATEGORIAGASTO, $categoriagasto->toKeyValue('PrimaryKey', 'Idcategoriagasto'), $comparison);
     } else {
         throw new PropelException('filterByCategoriagasto() only accepts arguments of type Categoriagasto or PropelCollection');
     }
 }
コード例 #2
0
 /**
  * Filter the query by a related Gastofacturacion object
  *
  * @param   Gastofacturacion|PropelObjectCollection $gastofacturacion  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 CategoriagastoQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByGastofacturacion($gastofacturacion, $comparison = null)
 {
     if ($gastofacturacion instanceof Gastofacturacion) {
         return $this->addUsingAlias(CategoriagastoPeer::IDCATEGORIAGASTO, $gastofacturacion->getIdcategoriagasto(), $comparison);
     } elseif ($gastofacturacion instanceof PropelObjectCollection) {
         return $this->useGastofacturacionQuery()->filterByPrimaryKeys($gastofacturacion->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByGastofacturacion() only accepts arguments of type Gastofacturacion or PropelCollection');
     }
 }