/** * 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'); } }