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