/** * Filter the query by a related Ciudad object * * @param Ciudad|PropelCollection $ciudad The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ClienteQuery The current query, for fluid interface */ public function filterByCiudadRelatedByIdProv($ciudad, $comparison = null) { if ($ciudad instanceof Ciudad) { return $this->addUsingAlias(ClientePeer::ID_PROV, $ciudad->getIdProvincia(), $comparison); } elseif ($ciudad instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ClientePeer::ID_PROV, $ciudad->toKeyValue('PrimaryKey', 'IdProvincia'), $comparison); } else { throw new PropelException('filterByCiudadRelatedByIdProv() only accepts arguments of type Ciudad or PropelCollection'); } }
/** * Declares an association between this object and a Ciudad object. * * @param Ciudad $v * @return Cliente The current object (for fluent API support) * @throws PropelException */ public function setCiudadRelatedByIdProv(Ciudad $v = null) { if ($v === null) { $this->setIdProv(NULL); } else { $this->setIdProv($v->getIdProvincia()); } $this->aCiudadRelatedByIdProv = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the Ciudad object, it will not be re-added. if ($v !== null) { $v->addClienteRelatedByIdProv($this); } return $this; }
/** * Filter the query by a related Ciudad object * * @param Ciudad $ciudad the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ProvinciaQuery The current query, for fluid interface */ public function filterByCiudad($ciudad, $comparison = null) { if ($ciudad instanceof Ciudad) { return $this->addUsingAlias(ProvinciaPeer::IDPROVINCIA, $ciudad->getIdProvincia(), $comparison); } elseif ($ciudad instanceof PropelCollection) { return $this->useCiudadQuery()->filterByPrimaryKeys($ciudad->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByCiudad() only accepts arguments of type Ciudad or PropelCollection'); } }