/** * Exclude object from result * * @param Producto $producto Object to remove from the list of results * * @return ProductoQuery The current query, for fluid interface */ public function prune($producto = null) { if ($producto) { $this->addUsingAlias(ProductoPeer::IDPRODUCTO, $producto->getIdproducto(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a Producto object. * * @param Producto $v * @return Venta The current object (for fluent API support) * @throws PropelException */ public function setProducto(Producto $v = null) { if ($v === null) { $this->setIdproducto(NULL); } else { $this->setIdproducto($v->getIdproducto()); } $this->aProducto = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the Producto object, it will not be re-added. if ($v !== null) { $v->addVenta($this); } return $this; }
/** * Filter the query by a related Producto object * * @param Producto|PropelCollection $producto The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return VentaQuery The current query, for fluid interface */ public function filterByProducto($producto, $comparison = null) { if ($producto instanceof Producto) { return $this->addUsingAlias(VentaPeer::IDPRODUCTO, $producto->getIdproducto(), $comparison); } elseif ($producto instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(VentaPeer::IDPRODUCTO, $producto->toKeyValue('PrimaryKey', 'Idproducto'), $comparison); } else { throw new PropelException('filterByProducto() only accepts arguments of type Producto or PropelCollection'); } }