/** * Filter the query by a related Inventario object * * @param Inventario|PropelObjectCollection $inventario the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ProductoQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByInventario($inventario, $comparison = null) { if ($inventario instanceof Inventario) { return $this->addUsingAlias(ProductoPeer::ID, $inventario->getProductoId(), $comparison); } elseif ($inventario instanceof PropelObjectCollection) { return $this->useInventarioQuery()->filterByPrimaryKeys($inventario->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByInventario() only accepts arguments of type Inventario or PropelCollection'); } }