/** * Filter the query by a related Marca object * * @param Marca|PropelObjectCollection $marca The related object(s) 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 filterByMarca($marca, $comparison = null) { if ($marca instanceof Marca) { return $this->addUsingAlias(ProductoPeer::MARCA_ID, $marca->getId(), $comparison); } elseif ($marca instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ProductoPeer::MARCA_ID, $marca->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByMarca() only accepts arguments of type Marca or PropelCollection'); } }