/** * Filter the query by a related Socio object * * @param Socio $socio the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return TipoSocioQuery The current query, for fluid interface */ public function filterBySocio($socio, $comparison = null) { if ($socio instanceof Socio) { return $this->addUsingAlias(TipoSocioPeer::ID, $socio->getTipoSocioId(), $comparison); } elseif ($socio instanceof PropelCollection) { return $this->useSocioQuery()->filterByPrimaryKeys($socio->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterBySocio() only accepts arguments of type Socio or PropelCollection'); } }