/** * Filter the query by a related Provincia object * * @param Provincia|PropelCollection $provincia The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CiudadQuery The current query, for fluid interface */ public function filterByProvincia($provincia, $comparison = null) { if ($provincia instanceof Provincia) { return $this->addUsingAlias(CiudadPeer::ID_PROVINCIA, $provincia->getIdprovincia(), $comparison); } elseif ($provincia instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CiudadPeer::ID_PROVINCIA, $provincia->toKeyValue('PrimaryKey', 'Idprovincia'), $comparison); } else { throw new PropelException('filterByProvincia() only accepts arguments of type Provincia or PropelCollection'); } }